From 994241f26f1eea2d6169209ed3ebcdd5d592a8a8 Mon Sep 17 00:00:00 2001 From: Michal Pawluk Date: Fri, 21 Aug 2015 13:02:08 +0200 Subject: [PATCH 02/11] The source code moved from the SPIN with license changed to Flora 1.1 Change-Id: I43426af13b3a77784385efd8f9105ac82200cb57 --- .gitignore | 10 + CMakeLists.txt | 96 ++ LICENSE | 205 +++ inc/all_apps.h | 85 ++ inc/app_grid.h | 98 ++ inc/app_icon.h | 161 +++ inc/app_item.h | 96 ++ inc/app_mgr.h | 88 ++ inc/conf.h | 610 ++++++++ inc/data_model.h | 209 +++ inc/db/db.h | 64 + inc/dynamic_index.h | 56 + inc/folder_panel.h | 133 ++ inc/homescreen-efl.h | 147 ++ inc/key.h | 30 + inc/layout.h | 33 + inc/livebox/grid_item_resize.h | 52 + inc/livebox/grid_reposition.h | 79 ++ inc/livebox/livebox_animator.h | 86 ++ inc/livebox/livebox_panel.h | 216 +++ inc/livebox/livebox_utils.h | 259 ++++ inc/livebox/livebox_widget.h | 97 ++ inc/livebox_all_pages.h | 57 + inc/mouse.h | 36 + inc/option_menu.h | 45 + inc/page_scroller.h | 164 +++ inc/popup.h | 76 + inc/tree.h | 108 ++ inc/util.h | 75 + org.tizen.homescreen-efl.efl | 23 + org.tizen.homescreen-efl.manifest | 11 + org.tizen.homescreen-efl.xml | 19 + packaging/org.tizen.homescreen-efl.spec | 93 ++ res/CMakeLists.txt | 4 + res/edje/CMakeLists.txt | 71 + res/edje/app_grid.edc | 148 ++ res/edje/folder.edc | 619 ++++++++ res/edje/folder_entry.edc | 376 +++++ res/edje/home.edc | 708 ++++++++++ res/edje/icon.edc | 627 ++++++++ res/edje/index_element.edc | 113 ++ res/edje/livebox_container.edc | 622 ++++++++ res/edje/livebox_layout.edc | 176 +++ res/edje/page_edit.edc | 292 ++++ res/edje/page_edit_util.edc | 108 ++ res/images/CMakeLists.txt | 48 + res/images/all_apps_icon_menu.png | Bin 0 -> 1286 bytes res/images/app_icon_checkbox_bg.png | Bin 0 -> 288 bytes res/images/app_icon_checkbox_border.png | Bin 0 -> 251 bytes res/images/app_icon_checkbox_on.png | Bin 0 -> 1325 bytes res/images/app_icon_downloadable.png | Bin 0 -> 4256 bytes res/images/app_press_117.png | Bin 0 -> 3104 bytes res/images/btn_add_nor.png | Bin 0 -> 2773 bytes res/images/btn_add_press.png | Bin 0 -> 2868 bytes res/images/btn_delete_nor.png | Bin 0 -> 3701 bytes res/images/btn_delete_press.png | Bin 0 -> 3742 bytes res/images/btn_input_clear.png | Bin 0 -> 1240 bytes res/images/core_page_indicator_on.png | Bin 0 -> 997 bytes res/images/core_page_indicator_on_horizontal.png | Bin 0 -> 160 bytes res/images/default.png | Bin 0 -> 17581 bytes res/images/default_bg.png | Bin 0 -> 57762 bytes res/images/edit_all_page_add.png | Bin 0 -> 1301 bytes res/images/edit_all_page_add_press.png | Bin 0 -> 1312 bytes res/images/edit_all_page_bg.png | Bin 0 -> 1804 bytes res/images/edit_all_page_create.png | Bin 0 -> 3132 bytes res/images/edit_all_page_drag.png | Bin 0 -> 849 bytes res/images/edit_page.png | Bin 0 -> 279 bytes res/images/edit_page_current.png | Bin 0 -> 279 bytes res/images/folder_appicon_bg.png | Bin 0 -> 5870 bytes res/images/folder_appicon_bg_impossible.png | Bin 0 -> 6376 bytes res/images/folder_appicon_bg_possible.png | Bin 0 -> 6361 bytes res/images/folder_appicon_empty_bg.png | Bin 0 -> 6151 bytes res/images/folder_popup_bg.png | Bin 0 -> 1261 bytes res/images/frame.png | Bin 0 -> 421 bytes res/images/home_button_bg.png | Bin 0 -> 2146 bytes res/images/home_edit_bg.#.png | Bin 0 -> 954 bytes res/images/home_icon_home.png | Bin 0 -> 1526 bytes res/images/home_icon_menu.png | Bin 0 -> 1267 bytes res/images/home_icon_reorder.png | Bin 0 -> 1209 bytes res/images/homescreen-efl.png | Bin 0 -> 57662 bytes res/images/icon_badge_container.png | Bin 0 -> 883 bytes res/images/livebox/preview_FMradio.png | Bin 0 -> 4863 bytes res/images/livebox/preview_alarm.png | Bin 0 -> 15981 bytes res/images/livebox/preview_calendar.png | Bin 0 -> 17062 bytes res/images/livebox/preview_contact_4x2.png | Bin 0 -> 17936 bytes res/images/livebox/preview_contact_4x4.png | Bin 0 -> 45239 bytes res/images/livebox/preview_dual_clock.png | Bin 0 -> 39495 bytes res/images/livebox/preview_gallery.png | Bin 0 -> 115999 bytes res/images/livebox/preview_internet_4x4.png | Bin 0 -> 21456 bytes res/images/livebox/preview_music.png | Bin 0 -> 11878 bytes res/images/livebox/preview_singel_clock.png | Bin 0 -> 20769 bytes res/images/livebox/preview_weather_4x2.png | Bin 0 -> 8269 bytes res/images/livebox/preview_weather_4x4.png | Bin 0 -> 15112 bytes res/images/reposition_bg.png | Bin 0 -> 354 bytes res/images/reposition_bg_shadow.png | Bin 0 -> 8659 bytes res/images/resize_button.png | Bin 0 -> 256 bytes res/po/CMakeLists.txt | 27 + res/po/ar.po | 402 ++++++ res/po/az.po | 453 ++++++ res/po/bg.po | 453 ++++++ res/po/ca.po | 453 ++++++ res/po/cs.po | 402 ++++++ res/po/da.po | 453 ++++++ res/po/de.po | 453 ++++++ res/po/el_GR.po | 453 ++++++ res/po/en.po | 402 ++++++ res/po/en_PH.po | 453 ++++++ res/po/en_US.po | 453 ++++++ res/po/es_ES.po | 453 ++++++ res/po/es_US.po | 453 ++++++ res/po/et.po | 453 ++++++ res/po/eu.po | 453 ++++++ res/po/fi.po | 453 ++++++ res/po/fr.po | 453 ++++++ res/po/fr_CA.po | 453 ++++++ res/po/ga.po | 453 ++++++ res/po/gl.po | 453 ++++++ res/po/hi.po | 402 ++++++ res/po/hr.po | 453 ++++++ res/po/hu.po | 453 ++++++ res/po/hy.po | 453 ++++++ res/po/is.po | 453 ++++++ res/po/it_IT.po | 453 ++++++ res/po/ja_JP.po | 453 ++++++ res/po/ka.po | 453 ++++++ res/po/kk.po | 453 ++++++ res/po/ko_KR.po | 453 ++++++ res/po/lt.po | 453 ++++++ res/po/lv.po | 453 ++++++ res/po/mk.po | 453 ++++++ res/po/nb.po | 453 ++++++ res/po/nl.po | 453 ++++++ res/po/pl.po | 453 ++++++ res/po/pt_BR.po | 402 ++++++ res/po/pt_PT.po | 453 ++++++ res/po/ro.po | 453 ++++++ res/po/ru_RU.po | 453 ++++++ res/po/sk.po | 453 ++++++ res/po/sl.po | 453 ++++++ res/po/sr.po | 453 ++++++ res/po/sv.po | 453 ++++++ res/po/tr_TR.po | 453 ++++++ res/po/uk.po | 453 ++++++ res/po/uz.po | 453 ++++++ res/po/zh_CN.po | 453 ++++++ res/po/zh_HK.po | 453 ++++++ res/po/zh_TW.po | 453 ++++++ shared/res/homescreen-efl.png | Bin 0 -> 57662 bytes src/all_apps.c | 225 +++ src/app_grid.c | 925 ++++++++++++ src/app_icon.c | 678 +++++++++ src/app_item.c | 120 ++ src/app_mgr.c | 362 +++++ src/data_model.c | 937 ++++++++++++ src/db/db.c | 330 +++++ src/dynamic_index.c | 375 +++++ src/folder_panel.c | 902 ++++++++++++ src/homescreen-efl.c | 1154 +++++++++++++++ src/key.c | 174 +++ src/layout.c | 41 + src/livebox/grid_item_resize.c | 667 +++++++++ src/livebox/grid_reposition.c | 681 +++++++++ src/livebox/livebox_animator.c | 227 +++ src/livebox/livebox_panel.c | 1647 ++++++++++++++++++++++ src/livebox/livebox_utils.c | 573 ++++++++ src/livebox/livebox_widget.c | 516 +++++++ src/livebox_all_pages.c | 1119 +++++++++++++++ src/mouse.c | 162 +++ src/option_menu.c | 305 ++++ src/page_scroller.c | 401 ++++++ src/popup.c | 237 ++++ src/tree.c | 238 ++++ src/util.c | 164 +++ tizen-manifest.xml | 16 + 174 files changed, 43127 insertions(+) create mode 100644 .gitignore create mode 100644 CMakeLists.txt create mode 100644 LICENSE create mode 100644 inc/all_apps.h create mode 100644 inc/app_grid.h create mode 100644 inc/app_icon.h create mode 100644 inc/app_item.h create mode 100644 inc/app_mgr.h create mode 100644 inc/conf.h create mode 100644 inc/data_model.h create mode 100644 inc/db/db.h create mode 100644 inc/dynamic_index.h create mode 100644 inc/folder_panel.h create mode 100644 inc/homescreen-efl.h create mode 100644 inc/key.h create mode 100644 inc/layout.h create mode 100644 inc/livebox/grid_item_resize.h create mode 100644 inc/livebox/grid_reposition.h create mode 100644 inc/livebox/livebox_animator.h create mode 100644 inc/livebox/livebox_panel.h create mode 100644 inc/livebox/livebox_utils.h create mode 100644 inc/livebox/livebox_widget.h create mode 100644 inc/livebox_all_pages.h create mode 100644 inc/mouse.h create mode 100644 inc/option_menu.h create mode 100644 inc/page_scroller.h create mode 100644 inc/popup.h create mode 100644 inc/tree.h create mode 100644 inc/util.h create mode 100644 org.tizen.homescreen-efl.efl create mode 100644 org.tizen.homescreen-efl.manifest create mode 100644 org.tizen.homescreen-efl.xml create mode 100644 packaging/org.tizen.homescreen-efl.spec create mode 100644 res/CMakeLists.txt create mode 100644 res/edje/CMakeLists.txt create mode 100644 res/edje/app_grid.edc create mode 100644 res/edje/folder.edc create mode 100644 res/edje/folder_entry.edc create mode 100644 res/edje/home.edc create mode 100644 res/edje/icon.edc create mode 100644 res/edje/index_element.edc create mode 100644 res/edje/livebox_container.edc create mode 100644 res/edje/livebox_layout.edc create mode 100644 res/edje/page_edit.edc create mode 100644 res/edje/page_edit_util.edc create mode 100644 res/images/CMakeLists.txt create mode 100644 res/images/all_apps_icon_menu.png create mode 100755 res/images/app_icon_checkbox_bg.png create mode 100755 res/images/app_icon_checkbox_border.png create mode 100755 res/images/app_icon_checkbox_on.png create mode 100644 res/images/app_icon_downloadable.png create mode 100644 res/images/app_press_117.png create mode 100644 res/images/btn_add_nor.png create mode 100644 res/images/btn_add_press.png create mode 100644 res/images/btn_delete_nor.png create mode 100644 res/images/btn_delete_press.png create mode 100755 res/images/btn_input_clear.png create mode 100755 res/images/core_page_indicator_on.png create mode 100755 res/images/core_page_indicator_on_horizontal.png create mode 100644 res/images/default.png create mode 100644 res/images/default_bg.png create mode 100644 res/images/edit_all_page_add.png create mode 100644 res/images/edit_all_page_add_press.png create mode 100644 res/images/edit_all_page_bg.png create mode 100755 res/images/edit_all_page_create.png create mode 100755 res/images/edit_all_page_drag.png create mode 100644 res/images/edit_page.png create mode 100644 res/images/edit_page_current.png create mode 100644 res/images/folder_appicon_bg.png create mode 100644 res/images/folder_appicon_bg_impossible.png create mode 100644 res/images/folder_appicon_bg_possible.png create mode 100644 res/images/folder_appicon_empty_bg.png create mode 100644 res/images/folder_popup_bg.png create mode 100644 res/images/frame.png create mode 100644 res/images/home_button_bg.png create mode 100644 res/images/home_edit_bg.#.png create mode 100644 res/images/home_icon_home.png create mode 100644 res/images/home_icon_menu.png create mode 100644 res/images/home_icon_reorder.png create mode 100644 res/images/homescreen-efl.png create mode 100644 res/images/icon_badge_container.png create mode 100644 res/images/livebox/preview_FMradio.png create mode 100644 res/images/livebox/preview_alarm.png create mode 100644 res/images/livebox/preview_calendar.png create mode 100644 res/images/livebox/preview_contact_4x2.png create mode 100644 res/images/livebox/preview_contact_4x4.png create mode 100644 res/images/livebox/preview_dual_clock.png create mode 100644 res/images/livebox/preview_gallery.png create mode 100644 res/images/livebox/preview_internet_4x4.png create mode 100644 res/images/livebox/preview_music.png create mode 100644 res/images/livebox/preview_singel_clock.png create mode 100644 res/images/livebox/preview_weather_4x2.png create mode 100644 res/images/livebox/preview_weather_4x4.png create mode 100644 res/images/reposition_bg.png create mode 100644 res/images/reposition_bg_shadow.png create mode 100644 res/images/resize_button.png create mode 100755 res/po/CMakeLists.txt create mode 100755 res/po/ar.po create mode 100755 res/po/az.po create mode 100755 res/po/bg.po create mode 100755 res/po/ca.po create mode 100755 res/po/cs.po create mode 100755 res/po/da.po create mode 100755 res/po/de.po create mode 100755 res/po/el_GR.po create mode 100755 res/po/en.po create mode 100755 res/po/en_PH.po create mode 100755 res/po/en_US.po create mode 100755 res/po/es_ES.po create mode 100755 res/po/es_US.po create mode 100755 res/po/et.po create mode 100755 res/po/eu.po create mode 100755 res/po/fi.po create mode 100755 res/po/fr.po create mode 100755 res/po/fr_CA.po create mode 100755 res/po/ga.po create mode 100755 res/po/gl.po create mode 100755 res/po/hi.po create mode 100755 res/po/hr.po create mode 100755 res/po/hu.po create mode 100755 res/po/hy.po create mode 100755 res/po/is.po create mode 100755 res/po/it_IT.po create mode 100755 res/po/ja_JP.po create mode 100755 res/po/ka.po create mode 100755 res/po/kk.po create mode 100755 res/po/ko_KR.po create mode 100755 res/po/lt.po create mode 100755 res/po/lv.po create mode 100755 res/po/mk.po create mode 100755 res/po/nb.po create mode 100755 res/po/nl.po create mode 100755 res/po/pl.po create mode 100755 res/po/pt_BR.po create mode 100755 res/po/pt_PT.po create mode 100755 res/po/ro.po create mode 100755 res/po/ru_RU.po create mode 100755 res/po/sk.po create mode 100755 res/po/sl.po create mode 100755 res/po/sr.po create mode 100755 res/po/sv.po create mode 100755 res/po/tr_TR.po create mode 100755 res/po/uk.po create mode 100755 res/po/uz.po create mode 100755 res/po/zh_CN.po create mode 100755 res/po/zh_HK.po create mode 100755 res/po/zh_TW.po create mode 100644 shared/res/homescreen-efl.png create mode 100644 src/all_apps.c create mode 100644 src/app_grid.c create mode 100644 src/app_icon.c create mode 100644 src/app_item.c create mode 100644 src/app_mgr.c create mode 100644 src/data_model.c create mode 100644 src/db/db.c create mode 100644 src/dynamic_index.c create mode 100644 src/folder_panel.c create mode 100644 src/homescreen-efl.c create mode 100644 src/key.c create mode 100644 src/layout.c create mode 100644 src/livebox/grid_item_resize.c create mode 100644 src/livebox/grid_reposition.c create mode 100644 src/livebox/livebox_animator.c create mode 100644 src/livebox/livebox_panel.c create mode 100644 src/livebox/livebox_utils.c create mode 100644 src/livebox/livebox_widget.c create mode 100644 src/livebox_all_pages.c create mode 100644 src/mouse.c create mode 100644 src/option_menu.c create mode 100644 src/page_scroller.c create mode 100644 src/popup.c create mode 100644 src/tree.c create mode 100644 src/util.c create mode 100644 tizen-manifest.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c952485 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +.cproject +.exportMap +.project +.sdk_delta.info +.sign/ +.rds_delta +.tproject +Debug/ +crash-info/ +/Release diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..f3ed15b --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,96 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +PROJECT(homescreen-efl C) + +SET(MANIFESTDIR "/usr/share/packages") +SET(PACKAGE_NAME "org.tizen.${PROJECT_NAME}") +SET(PREFIX "/opt/usr/apps/${PACKAGE_NAME}") +SET(EXEC_PREFIX "${PREFIX}/bin") +SET(DATADIR "${PREFIX}/data") +SET(RESDIR "${PREFIX}/res") +SET(IMAGEDIR "${RESDIR}/images") +SET(EDJEDIR "${RESDIR}/edje") +SET(LOCALEDIR "${RESDIR}/locale") +SET(VERSION 0.1.0) +SET(CMAKE_VERBOSE_MAKEFILE 0) + +INCLUDE(FindPkgConfig) +pkg_check_modules(MENU_PKGS REQUIRED + appsvc + badge + capi-appfw-application + capi-system-info + capi-appfw-package-manager + capi-appfw-app-manager + capi-system-system-settings + dlog + elementary + shortcut + syspopup-caller + widget_viewer + widget_service + widget_viewer_evas + capi-appfw-preference +) + +ADD_DEFINITIONS("-DENABLE_BGIMAGE") +ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"") +ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE_NAME}\"") +ADD_DEFINITIONS("-DVERSION=\"${VERSION}\"") +ADD_DEFINITIONS("-DDATADIR=\"${DATADIR}\"") +ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"") +ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"") +ADD_DEFINITIONS("-DEDJEDIR=\"${EDJEDIR}\"") + +FOREACH (flag ${MENU_PKGS_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Werror -Winline -g -fno-builtin-malloc -fpie") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") + +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/inc) + +ADD_EXECUTABLE(${PROJECT_NAME} + src/homescreen-efl.c + src/all_apps.c + src/app_mgr.c + src/app_item.c + src/data_model.c + src/tree.c + + src/app_grid.c + src/layout.c + src/page_scroller.c + src/util.c + src/app_icon.c + src/key.c + src/option_menu.c + src/mouse.c + src/folder_panel.c + src/popup.c + src/dynamic_index.c + src/livebox_all_pages.c + src/db/db.c + + src/livebox/livebox_panel.c + src/livebox/livebox_animator.c + src/livebox/grid_item_resize.c + src/livebox/livebox_utils.c + src/livebox/grid_reposition.c + src/livebox/livebox_widget.c +) + +TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} -lm) +TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${MENU_PKGS_LDFLAGS}) + +# Install +INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${EXEC_PREFIX}) + +ADD_SUBDIRECTORY(res) + +CONFIGURE_FILE(${PACKAGE_NAME}.xml ${CMAKE_BINARY_DIR}/${PACKAGE_NAME}.xml) +INSTALL(FILES ${CMAKE_BINARY_DIR}/org.tizen.homescreen-efl.xml DESTINATION ${MANIFESTDIR}) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PACKAGE_NAME}.efl DESTINATION /etc/smack/accesses.d) +INSTALL(DIRECTORY DESTINATION ${PREFIX}/data) + +# End of a file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..3f4bbb5 --- /dev/null +++ b/LICENSE @@ -0,0 +1,205 @@ +Flora License + +Version 1.1, April, 2013 + +http://floralicense.org/license/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, +and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by +the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and +all other entities that control, are controlled by, or are +under common control with that entity. For the purposes of +this definition, "control" means (i) the power, direct or indirect, +to cause the direction or management of such entity, +whether by contract or otherwise, or (ii) ownership of fifty percent (50%) +or more of the outstanding shares, or (iii) beneficial ownership of +such entity. + +"You" (or "Your") shall mean an individual or Legal Entity +exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation source, +and configuration files. + +"Object" form shall mean any form resulting from mechanical +transformation or translation of a Source form, including but +not limited to compiled object code, generated documentation, +and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, +made available under the License, as indicated by a copyright notice +that is included in or attached to the work (an example is provided +in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, +that is based on (or derived from) the Work and for which the editorial +revisions, annotations, elaborations, or other modifications represent, +as a whole, an original work of authorship. For the purposes of this License, +Derivative Works shall not include works that remain separable from, +or merely link (or bind by name) to the interfaces of, the Work and +Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original +version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor +for inclusion in the Work by the copyright owner or by an individual or +Legal Entity authorized to submit on behalf of the copyright owner. +For the purposes of this definition, "submitted" means any form of +electronic, verbal, or written communication sent to the Licensor or +its representatives, including but not limited to communication on +electronic mailing lists, source code control systems, and issue +tracking systems that are managed by, or on behalf of, the Licensor +for the purpose of discussing and improving the Work, but excluding +communication that is conspicuously marked or otherwise designated +in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity +on behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work. + +"Tizen Certified Platform" shall mean a software platform that complies +with the standards set forth in the Tizen Compliance Specification +and passes the Tizen Compliance Tests 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 + and your own copyright statement or terms and conditions do not conflict + the conditions stated in the License including section 3. + +5. Submission of Contributions. Unless You explicitly state otherwise, +any Contribution intentionally submitted for inclusion in the Work +by You to the Licensor shall be under the terms and conditions of +this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify +the terms of any separate license agreement you may have executed +with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade +names, trademarks, service marks, or product names of the Licensor, +except as required for reasonable and customary use in describing the +origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or +agreed to in writing, Licensor provides the Work (and each +Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied, including, without limitation, any warranties or conditions +of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +PARTICULAR PURPOSE. You are solely responsible for determining the +appropriateness of using or redistributing the Work and assume any +risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, +whether in tort (including negligence), contract, or otherwise, +unless required by applicable law (such as deliberate and grossly +negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, +incidental, or consequential damages of any character arising as a +result of this License or out of the use or inability to use the +Work (including but not limited to damages for loss of goodwill, +work stoppage, computer failure or malfunction, or any and all +other commercial damages or losses), even if such Contributor +has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing +the Work or Derivative Works thereof, You may choose to offer, +and charge a fee for, acceptance of support, warranty, indemnity, +or other liability obligations and/or rights consistent with this +License. However, in accepting such obligations, You may act only +on Your own behalf and on Your sole responsibility, not on behalf +of any other Contributor, and only if You agree to indemnify, +defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason +of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Flora License to your work + +To apply the Flora License to your work, attach the following +boilerplate notice, with the fields enclosed by brackets "[]" +replaced with your own identifying information. (Don't include +the brackets!) The text should be enclosed in the appropriate +comment syntax for the file format. We also recommend that a +file or class name and description of purpose be included on the +same "printed page" as the copyright notice for easier +identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Flora License, Version 1.1 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://floralicense.org/license/ + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/inc/all_apps.h b/inc/all_apps.h new file mode 100644 index 0000000..5c96691 --- /dev/null +++ b/inc/all_apps.h @@ -0,0 +1,85 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALL_APPS_H_ +#define ALL_APPS_H_ + +#include +#include "app_grid.h" +#include "data_model.h" + +/** + * @brief Creates all apps panel + * @param parent elm_layout widget with proper swallow part + * @return pointer to Evas_Object + */ +Evas_Object *all_apps_create(Evas_Object *parent, void *data); + +/** + * @brief Shows all_apps panel + */ +void all_apps_show(void); + +/** + * @brief [Hides all apps panel + */ +void all_apps_hide(void); + +/** + * @brief [brief description] + * @details [long description] + */ +void all_apps_del(void); + +/** + * @brief Sets view mode of all apps view + */ +void all_apps_set_view_mode(homescreen_view_t view); + +/** + * @brief Function blocks srolling of the all_apps panel. + * @details It is used during items reposition. + * + * @param is_blocked bool value, true if should be blocked + */ +void all_apps_set_scrolling_blocked_state(bool is_blocked); + +/** + * @brief detaches app icon from grid: + */ +void all_apps_detach_from_grid(Elm_Object_Item *grid_item); + +/** + * @brief attaches app icon to grid number grid_num: + */ +Elm_Object_Item *all_apps_attach_to_grid(Evas_Object *icon, int grid_num); + +/** + * @brief appends new page to the page scroller + */ +bool all_apps_append_page(Tree_node_t *page_item); + +/** + * @brief appends new page to the page scroller + */ +void all_apps_remove_empty_pages(void); + +/** + * @brief it simply updates all pages dynamic index display + */ +void all_apps_update_dynamic_index_count(void); + +#endif /* ALL_APPS_H_ */ diff --git a/inc/app_grid.h b/inc/app_grid.h new file mode 100644 index 0000000..0de34ce --- /dev/null +++ b/inc/app_grid.h @@ -0,0 +1,98 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef APP_GRID_H_ +#define APP_GRID_H_ + +#include +#include "homescreen-efl.h" +#include "tree.h" + +typedef enum { + APP_GRID_TYPE_ALL_APPS = 0, + APP_GRID_TYPE_FOLDER +} app_grid_type_t; +/** + * @brief Function creates app_grid wgt + * @details This is a kind of wrapper for a gengrid widget but handle drag and + * drop events between different gengrids created by this function. Reposition + * mechanism found active gengrid behind mouse pointer. Reposition is gengeric. + * If you want to modify it you should set some callbacks in function + * app_grid_custom_dnd_handlers_set. + * + * @param parent Pointer to eveas_object. Smart parent widget for app grid. + * Basically you can add it into win. + * @param data Pointer to Eina_List object with content will be inserted in + * applicaiton list. + * @param item_width int describes width of an item in grid. + * @param item_height ind describes height of an item in grid + * @return pointer to created app_grid + */ +extern Evas_Object *app_grid_create(Evas_Object *parent, Tree_node_t *data, + Evas_Coord gengrid_width, Evas_Coord gengrid_height, + app_grid_type_t type); + +/** + * @brief Append an imte inot app_grid + * @param app_grid Pointer to elm_gengrid widget + * @param icon_to_append pointer to appended item + * + * @return Elm_Object_Item if no errors, otherwise NULL + */ +extern Elm_Object_Item *app_grid_append_item(Evas_Object *app_grid, + Evas_Object *icon_to_append); + +/** + * @brief Function inserts an item into specific position. If idx is inproper + * function tries to insert item at the end of the grid. + * + * @param app_grid Pointer to app_grid + * @param item Pointer to item evas_object + * @param idx index where item should be inserted + * + * @return Elm_Object_Item if no errors, otherwise NULL + */ +extern Elm_Object_Item *app_grid_insert_item_relative(Evas_Object *app_grid, + Evas_Object *item, Elm_Object_Item *rel_it); + +/** + * @brief Function change state of app grids in homescreen + * + * @param app_grid Pointer to elm_layout widget + * @param view type of view mode + */ +extern void app_grid_set_view_mode(Evas_Object *app_grid, + homescreen_view_t view); + +/** + * @brief Function unpack item from the app_grid + * + * @param item pointer to stored data model + */ +extern void app_grid_unpack_item(Elm_Object_Item *item); + +/** + * @brief Function pack object to box + */ +extern Evas_Object *app_grid_item_pack(Evas_Object *p, Evas_Object *c); + +/** + * @brief Function get icon and data from app_grid item + */ +extern Eina_Bool app_grid_get_item_content(Elm_Object_Item *item, + Evas_Object **icon, Tree_node_t **data); + +#endif /* APP_GRID_H_ */ diff --git a/inc/app_icon.h b/inc/app_icon.h new file mode 100644 index 0000000..a0d027e --- /dev/null +++ b/inc/app_icon.h @@ -0,0 +1,161 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef APP_ICON_H_ +#define APP_ICON_H_ + +#include +#include + +#include "homescreen-efl.h" +#include "app_item.h" +#include "tree.h" + +typedef struct { + char *app_name; + char *app_appid; +} app_icon_popup_info_t; + +typedef enum { + APP_ICON_TYPE_APP = 0, + APP_ICON_TYPE_FOLDER, + APP_ICON_TYPE_MINIATURE, +} app_icon_type_t; + +typedef enum { + FOLDER_ICON_FRAME_POSSIBLE = 0, + FOLDER_ICON_FRAME_IMPOSSIBLE, + FOLDER_ICON_FRAME_NONE, +} folder_icon_frame_type_t; + +/** + * @brief Sets ignore click flag. + * + * @param ignore if it is true click event on icon will not be processed. + */ +extern void app_icon_set_click_ignore(bool ignore); + +/** + * @brief Remove icon object + * @details Function removes elm_layout widget responsible for application + * shortcut view. It deletes also elm_image widget (application shortuc image) + * with is a child of icon_layout. + * + * @param icon_layout Evas_Object pointer to item witch will be deleted. + */ +extern void app_icon_destroy(Evas_Object *icon_layout); + +/** + * @brief Sets badge number and shows it on application icon. + * + * @param app_icon_layout application icon layout. + * @param int number with will be displayed in badge layout. + */ +extern void app_icon_show_badge(Evas_Object *app_icon_layout, + const unsigned int number); + +/** + * @brief Hides badge icon on application. + * @details [long description] + * @param application icon layout pointer. + */ +extern void app_icon_hide_badge(Evas_Object *app_icon_layout); + +/** + * @brief Sets icon label visible + * @param app_icon_layout pointer to icon layout. + */ +extern void app_icon_show_label(Evas_Object *app_icon_layout); + +/** + * @brief Sets icon label invisible. + * @param app_icon_layout pointer to icon layout. + */ +extern void app_icon_hide_label(Evas_Object *app_icon_layout); + +/** + * @brief Function chage state of icon regarind to passed view type + * + * @param icon Pointer to icon object which should be changed. + * @param view view type + * @param in_folder value indicating whether given item is in folder + * + * @return true if success + */ +bool app_icon_set_view_mode(Evas_Object *icon, homescreen_view_t view, + bool in_folder); + +/** + * @brief Creates icon using app_item_t structure + * + * @param parent Parent widget pointer + * @param item pointer to app_item_t structure + * + * @return Pointer to created icon or NULL. + */ +Evas_Object *app_icon_create(Tree_node_t *tree_data, app_icon_type_t type); + +/** + * @brief Updates miniatures in folder icon + * + * @param folder_icon_layout folder icon layout to update + * @param folder_miniatures list of miniatures shown in folder icon + * @param folder_app_tree applications on the first page of folder + */ +void app_icon_update_folder_icon(Tree_node_t *folder_node); + +/** + * @brief Highlights folder icon with specified frame type + * + * @param folder_icon_layout folder icon layout to highlight + * @param frame_type type of frame to use on folder icon + */ +void app_icon_highlight_folder_icon(Evas_Object *folder_icon_layout, + folder_icon_frame_type_t frame_type); + +/** + * @brief Sets icon's label + * + * @param icon_layout icon layout in which label is set + * @param label label to set + */ +void app_icon_set_label(Evas_Object *icon_layout, const char* label); + +/** + * @brief Sets icon layout's color + * + * @param icon_layout icon layout to set color + * @param r red component of given color + * @param g green component of given color + * @param b blue component of given color + * @param a alpha component of given color + */ +void app_icon_set_color(Evas_Object *icon_layout, int r, int g, int b, int a); + +/** + * @brief Sets icon's label color to black + * + * @param icon_layout icon layout in which label's color is changed + */ +void app_icon_set_label_black(Evas_Object *icon_layout); + +/** + * @brief Removes all data connected with icon_layout + * @param icon_layout Pointer to app_icon layout. + */ +void app_icon_remove(Evas_Object *icon_layout); + +#endif /* APP_ICON_H_ */ diff --git a/inc/app_item.h b/inc/app_item.h new file mode 100644 index 0000000..8a4d199 --- /dev/null +++ b/inc/app_item.h @@ -0,0 +1,96 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef APP_ITEM_H_ +#define APP_ITEM_H_ + +#include +#include + +typedef enum { + APP_ITEM_ROOT = 0, + APP_ITEM_HOME, + APP_ITEM_ALL_APPS_ROOT, + APP_ITEM_PAGE, + APP_ITEM_ICON, + APP_ITEM_FOLDER, + APP_ITEM_WIDGET +} app_item_type_t; + +typedef struct { + app_item_type_t type; + int unique_id; /*from db table; used for composing tree structure when + reading flattened db representation*/ + char *label; /*this is the name of the application + viewed in homescreen layout*/ + const char *icon; + const char *exec; /*app exec path - used for notifications*/ + const char *appid; + unsigned int badge_count; /*notification count viewed in icon badge*/ + void *data; /*pointer is used by folder to store the folder layout.*/ + bool removable; + bool is_checked; + Evas_Object *layout; + Elm_Object_Item *grid_item; + int col; + int row; + int col_span; + int row_span; + + char *content_info; +} app_item_t; + +/** + * @brief creates new app_item_t object + * @param type object type + * @param unique_id object id + * @param label label text + * @param icon path to icon + * @param exec app to exec on click + * @param appid application id + * @param data extra data + * @param is_removeable na the app be removed + * @param col object column (used only for widgets) + * @param row object row (used only for widgets) + * @param col_span object column span (used only for widgets) + * @param row_span object row span (used only for widgets) + * @return + */ +app_item_t *app_item_create(const app_item_type_t type, const int unique_id, + const char *label, const char *icon, const char *exec, + const char *appid, void *data, bool is_removeable, + int col, int row, int col_span, int row_span, + const char *content_info); + +/** + * @brief Function frees all data connected with the item + * @param item Pointer to application item. + */ +void app_item_free(app_item_t *item); + +/** + * @brief updates app_item_geometry + * @param app_item app_item to be updated + * @param x new pos + * @param y new pos + * @param w new width + * @param h new height + */ +void app_item_geometry_update(app_item_t *app_item, int x, int y, int w, int h); + +void app_item_update_content_info(app_item_t *app_item, const char *content_info); + +#endif /* APP_ITEM_H_ */ diff --git a/inc/app_mgr.h b/inc/app_mgr.h new file mode 100644 index 0000000..589f7f2 --- /dev/null +++ b/inc/app_mgr.h @@ -0,0 +1,88 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef APP_MGR_H_ +#define APP_MGR_H_ + +#include +#include "util.h" + +typedef struct { + char *label; + char *exec; + char *icon; + char *appid; + char *package; + bool removable; +} app_mgr_item_t; + +typedef void (*package_event_manager_event_callback_t)(const char *app_info, + int progress); + +/** + * @brief Initialize application manager + */ +extern void app_mgr_init(void); + +/** + * @brief Deinintialize application manager + */ +extern void app_mgr_deinit(void); + +/** + * @brief Gets the application list + */ +extern Eina_List *app_mgr_get_apps(void); + +/** + * @brief Destroys application list + */ +extern void app_mgr_free_apps(Eina_List *apps); + +/** + * @brief Uninstall an application from the platform + */ +extern Eina_Bool app_mgr_uninstall_app(const char *appid); + +/** + * @brief gets badge count + * @param app_id - application id + * @param count - badges count + * returns EINA_FALSE on failure + */ +extern Eina_Bool app_mgr_app_get_badge_count(const char *app_id, + unsigned int *count); + +/** +* @brief registers listener for badge status changes +* @param callback - callback function to call on badge change +*/ +extern void app_mgr_register_badge_callback(badge_change_cb callback); + +/** +* @brief uregisters listener for badge status changes +* @param callback - callback function previously registered +*/ +extern void app_mgr_unregister_badge_callback(badge_change_cb callback); + +/** + * @brief Returns application label + * @details Function is used only for update application label after language change. + * @param app_id Application id. + */ +char *app_mgr_get_app_label(const char *app_id); + +#endif /* APP_MGR_H_ */ diff --git a/inc/conf.h b/inc/conf.h new file mode 100644 index 0000000..36d2161 --- /dev/null +++ b/inc/conf.h @@ -0,0 +1,610 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CONF_H_ +#define CONF_H_ + + +/* #define HOME_SCREEN_EFL_TEST_RUN 1 */ +/* #define HOME_SCREEN_DND_ENABLED 1 */ +/* #define HOME_SCREEN_BLUR_ENABLED 1 */ + +#define FRAMES_PER_SECOND 1.0/60.0 + +/*=================================SCREEN CONF================================*/ +#define INDICATOR_HEIGHT 52 +#define ROOT_WIN_H 1280 +#define ROOT_WIN_W 720 + +#define HD_WIDTH 720 +#define HD_HEIGHT 1280 +#define QHD_WIDTH 540 +#define QHD_HEIGHT 960 +#define WVGA_WIDTH 480 +#define WVGA_HEIGHT 800 + +#define HD_SCALE_FACTOR 1.2 +#define QHD_SCALE_FACTOR 0.85 +#define WVGA_SCALE_FACTOR 0.70 + +/*=================================DATA KEYS CONF=============================*/ +#define KEY_ICON_DATA "item_data" +#define KEY_REPOSITION_DATA "reposition_data" +#define KEY_APP_GRID_DATA "app_grid_data" +#define KEY_THUMB_DATA "thumb_data" + +#define KEY_IS_REPOSITIONABLE "is_repositionable" +#define KEY_INDEX "index_data" + +/*=================================DATABASE===================================*/ +#define DATABASE_FILE \ + "/opt/usr/apps/org.tizen.homescreen-efl/data/homescreen-efl.db" + +/*=================================RESOURCES==================================*/ +#define DEFAULT_BG \ + "opt/usr/apps/com.samsung.home-lite/res/images/default_bg.png" +#define EDJE_DIR "/opt/usr/apps/org.tizen.homescreen-efl/res/edje" +#define IMAGE_DIR "/opt/usr/apps/org.tizen.homescreen-efl/res/images" + +/******************************************************************************* +* +* +* SOURCE CONFIGS +* +* +*******************************************************************************/ + +/*================================ OPTION_MENU.C==============================*/ +#define OPTION_MENU_ADD_VIEWER "org.tizen.add-viewer" +#define OPTION_MENU_SETTINGS "org.tizen.wallpaper-ui-service" +#define CAPTION_MENU_CENTER_LABEL_TEXT_LEN_MAX 16 + +#define INDEX_HEIGHT 45 +#define BUTTONS_AREA 0.055 +/*================================ ALL_APPS.C=================================*/ +#define APP_ROWS 5 +#define APP_COLS 4 + +#define APPS_SHOW_HIDE_ANIMATION_TIME 0.35 +#define ALL_APPS_ANIMATION_DELTA_Y (0.2*(double)ROOT_WIN_H) +#define ALL_APPS_ANIMATION_HOME_DELTA_Y (0.8 * (double) ROOT_WIN_H) + +/*================================ APP_ICON.C=================================*/ +#define DEFAULT_APP_ICON \ + "/opt/usr/apps/org.tizen.homescreen-efl/res/images/default.png" + +#define BADGE_REL_X 0.85 +#define BADGE_REL_Y 0.00 + +#define SIGNAL_HIGHLIGHT_FOLDER "highlight_folder" +#define SIGNAL_UNHIGHLIGHT_FOLDER "unhighlight_folder" +#define SIGNAL_HIGHLIGHT_IMPOSSIBLE_FOLDER "highlight_impossible_folder" + +/*================================ APP_GRID.C=================================*/ +#define GRID_CONTENT "elm.swallow.icon" +#define EDIT_MODE_SCALE 0.9 +#define CHOOSE_MODE_SCALE 0.9 +#define CHANGE_PAGE_TIMER 0.3 +#define CHANGE_PAGE_LEFT_AREA 0.05 +#define CHANGE_PAGE_RIGHT_AREA 0.95 + +#define SIGNAL_APP_GRID_FULL "app_grid_full" +#define SIGNAL_APP_GRID_BG_HIDE "signal_app_grid_bg_hide" + +/*================================ DATA_MODEL.C===============================*/ +#define APPS_PAGE APP_ROWS*APP_COLS +#define FOLDER_APPS_PAGE 9 + +/*================================ LIVEBOX CONFIG ============================*/ +#define WIDGET_NR_OF_SIZE_LIST 13 +#define LIVEBOX_ON_CREATE_SIZE 4 +#define LIVEBOX_MIN_MOUSE_MOVE 100 + +#define TEST_PKG "/opt/usr/apps/org.tizen.homescreen-efl/res/images/livebox/" +#define TEST_PKG_ALARM TEST_PKG"preview_alarm.png" +#define TEST_PKG_DUAL_CLOCK TEST_PKG"preview_dual_clock.png" +#define TEST_PKG_MUSIC TEST_PKG"preview_music.png" +#define TEST_PKG_CALENDAR TEST_PKG"preview_calendar.png" +#define TEST_PKG_FMRADIO TEST_PKG"preview_FMradio.png" +#define TEST_PKG_SINGLE_CLOCK TEST_PKG"preview_singel_clock.png" +#define TEST_PKG_CONTACT_4_2 TEST_PKG"preview_contact_4x2.png" +#define TEST_PKG_GALERY TEST_PKG"preview_gallery.png" +#define TEST_PKG_WEATHER_4_2 TEST_PKG"preview_weather_4x2.png" +#define TEST_PKG_CONTACT_4_4 TEST_PKG"preview_contact_4x4.png" +#define TEST_PKG_INTERNET TEST_PKG"preview_internet_4x4.png" +#define TEST_PKG_WEATHER_4_4 TEST_PKG"preview_weather_4x4.png" + +#define EDJE_LIVEBOX_CONTAINER_FILENAME EDJE_DIR"/livebox_container.edj" +#define GROUP_LIVEBOX_CONTAINER "livebox_container" + +#define EDJE_LIVEBOX_LAYOUT_FILENAME EDJE_DIR"/livebox_layout.edj" +#define GROUP_LIVEBOX_LAYOUT "livebox" + +#define LIVEBOX_SCROLLER_MAX_PAGES 6 +#define LIVEBOX_GRID_ROWS 4 +#define LIVEBOX_GRID_COLUMNS 4 +#define LIVEBOX_GRID_ROWS_CELLS_MULTI 1 +#define LIVEBOX_TOTAL_ROWS (LIVEBOX_GRID_ROWS * LIVEBOX_GRID_ROWS_CELLS_MULTI) +#define LIVEBOX_TOTAL_COLUMNS \ + (LIVEBOX_GRID_COLUMNS * LIVEBOX_GRID_ROWS_CELLS_MULTI) + +#define LIVEBOX_RESIZE_POS_MULTI_ROWS (1.0 / LIVEBOX_TOTAL_ROWS) +#define LIVEBOX_RESIZE_POS_MULTI_COLS (1.0 / LIVEBOX_TOTAL_COLUMNS) +#define LIVEBOX_GRID_BG_PADDING 3 +#define LIVEBOX_MAX_BUTTON_NAME_LENGTH 15 +#define LIVEBOX_PAGE_HEIGHT_REL (1.0*ROOT_WIN_W/ROOT_WIN_H) +/*this should be smaller than scroller page*/ +#define LIVEBOX_SIZE_REL (1.0*ROOT_WIN_W/ROOT_WIN_H) +/*size of the area which causes page change during drag'n drop*/ +#define LIVEBOX_PAGE_CHANGE_RECT_SIZE 60 +#define LIVEBOX_PAGE_NO_CHANGE -1 +#define LIVEBOX_DRAGGED_ITEM_ALPHA 96 +#define LIVEBOX_LONGPRESS_TIME 1 +#define LIVEBOX_PAGE_CHANGE_PERIOD 0.75 +#define LIVEBOX_MAX_STATE_LEN 10 +#define LIVEBOX_HORIZONTAL_PADDING 10 +#define LIVEBOX_MAKE_SPACE_ANIM_TIME 0.33 +#define LIVEBOX_GRID_BG_ALPHA 40 + 51 +#define LIVEBOX_REPOSITION_ANIM_TIME 0.33 + +#define PART_LIVEBOX "livebox" +#define PART_RESIZE_BUTTON_DOWN "button.down" +#define PART_RESIZE_BUTTON_LEFT "button.left" +#define PART_RESIZE_BUTTON_UP "button.up" +#define PART_RESIZE_BUTTON_RIGHT "button.right" +#define PART_ADD_PAGE_BUTTON "add_page_button" +#define PART_PAGE_BG "bg" +#define PART_GRID_BG "grid_bg" +#define PART_GRID "grid" + +#define SIGNAL_CONTENT_SOURCE "content" +#define SIGNAL_LIVEBOX_SOURCE "livebox" +#define SIGNAL_LAYOUT_SOURCE "layout" +#define SIGNAL_REMOVE_SOURCE "remove_button" +#define SIGNAL_RESIZING "drag" +#define SIGNAL_RESIZE_END "drag,stop" +#define SIGNAL_RESIZE_SLIDER_DRAG_OK "drag,ok" +#define SIGNAL_RESIZE_SLIDER_DRAG_ERR "drag,outside" +#define SIGNAL_RESIZE_SLIDERS_SHOW "sliders,show" +#define SIGNAL_RESIZE_SLIDERS_HIDE "sliders,hide" +/*#define SIGNAL_REMOVE_BUTTON_CLICKED "remove_button,clicked" */ +#define SIGNAL_CLICKED "mouse,clicked,*" +#define SIGNAL_LIVEBOX_REMOVE_BUTTON_SHOW "remove_button,show" +#define SIGNAL_LIVEBOX_REMOVE_BUTTON_HIDE "remove_button,hide" +#define SIGNAL_REMOVE_BUTTON_INSTANT_HIDE "remove_button,hide,instant" +#define SIGNAL_LIVEBOX_REPOSITION_BG_SHOW "reposition_bg,show" +#define SIGNAL_LIVEBOX_REPOSITION_BG_HIDE "reposition_bg,hide" +#define SIGNAL_EMPTY_PAGE_SHOW "empty_page,show" +#define SIGNAL_EMPTY_PAGE_HIDE "empty_page,hide" +#define SIGNAL_EMPTY_PAGE_EDIT_START "empty_page,edit,start" +#define SIGNAL_EMPTY_PAGE_EDIT_STOP "empty_page,edit,stop" +#define SIGNAL_EDIT_START "edit,start" +#define SIGNAL_EDIT_STOP "edit,stop" +#define SIGNAL_ADD_SHOW "add,show" +#define SIGNAL_ADD_HIDE "add,hide" +#define SIGNAL_ADD_PAGE_CLICKED "add_page_button_clicked" +#define SIGNAL_SCROLLER_PAGE_COUNT_CHANGED "scroller,count,changed" +#define SIGNAL_MOUSE_DOWN "mouse,down,*" +#define SIGNAL_MOUSE_UP "mouse,up,*" +#define SIGNAL_SCROLLER_DRAG_START "scroll,drag,start" +#define SIGNAL_SCROLLER_SCROLL "scroll" +#define SIGNAL_GRID_SHADOW_SHOW "grid,show" +#define SIGNAL_GRID_SHADOW_HIDE "grid,hide" +#define CANNOT_ADD_PAGE_INFO "There is not enough space on the home screen." +#define CANNOT_ADD_WIDGET_INFO "Unsupported widget size." + +/*========================== ALL PAGES CONFIG ================================*/ +#define GENGRID_ITEM_CONTENT "elm.swallow.icon" + +#define IMAGE_ADD_PAGE_FILENAME \ + "/usr/apps/com.samsung.home-lite/res/images/edit_all_page_create.png" + +#define ALL_PAGES_X 0 +#define ALL_PAGES_Y 0 + +#define THUMB_W_REL (320.0/ROOT_WIN_W) +#define THUMB_H_REL (320.0/ROOT_WIN_H) + +#define ITEM_W_REL (336.0/ROOT_WIN_W) +#define ITEM_H_REL (397.0/ROOT_WIN_H) + +#define MAX_ITEMS 6 +#define ITEM_CREATE_TIME 0.5 +#define OFFSET 100 +/*========================== KEY CONFIG ======================================*/ + +#define KEY_HOME "XF86Phone" +#define KEY_MENU "XF86Send" +#define KEY_BACK "XF86Back" +#define KEY_RETURN "Return" + + +/*======================== FOLDER CONFIG =====================================*/ +#define FOLDER_MAX_ITEMS 9 +#define FOLDER_POPUP_Y_REL 0.1677 + +/*======================== POPUP CONFIG ================================*/ +#define POPUP_MAX_FOLDER_ITEMS_TEXT "There is not enough space in folder" + +/******************************************************************************* +* +* +* EDC FILE CONFIGURATIONS +* +* +*******************************************************************************/ +#define SIGNAL_SOURCE "layout" + +/*========================== HOME VIEW CONFIG ================================*/ +#define _HOME_WGT_MIN_Y 80 +#define _HOME_WGT_MAX_Y 1140 +#define _HOME_WGT_EDIT_MAX_Y 1034 + +#define _HOME_BTNS_Y_MIN 1188 +#define _HOME_BTNS_Y_MAX 1263 +#define _HOME_MENU_BTN_X_MIN 32 +#define _HOME_MENU_BTN_X_MAX 161 + +#define _HOME_HOME_BTN_X_MIN 559 +#define _HOME_HOME_BTN_X_MAX 688 +#define _HOME_CHOOSER_CAPTION_Y_MIN 0 +#define _HOME_CHOOSER_CAPTION_Y_MAX 80 + +#define _HOME_PG_INDEX_X_MIN 161 +#define _HOME_PG_INDEX_X_MAX 559 + +#define INDICE_NEXT_PAGE_X_MIN 0.99 +#define INDICE_NEXT_PAGE_X_MAX 1.00 +#define INDICE_PREV_PAGE_X_MIN 0.00 +#define INDICE_PREV_PAGE_X_MAX 0.01 + +#define _MAIN_CONTENT_Y_MIN 72 /*TODO: This value should be 42*/ +#define _MAIN_CONTENT_Y_MAX 862 +#define _APP_CONTENT_Y_MAX 1172 + +#define CONTENT_Y_MIN _MAIN_CONTENT_Y_MIN/ROOT_WIN_H; +#define CONTENT_Y_MAX _MAIN_CONTENT_Y_MAX/ROOT_WIN_H; +#define CONTENT_APP_Y_MAX _APP_CONTENT_Y_MAX/ROOT_WIN_H; + +#define HOME_WGT_MIN_Y _HOME_WGT_MIN_Y/ROOT_WIN_H +#define HOME_WGT_MAX_Y _HOME_WGT_MAX_Y/ROOT_WIN_H +#define HOME_WGT_EDIT_MAX_Y _HOME_WGT_EDIT_MAX_Y/ROOT_WIN_H + +#define HOME_BTNS_Y_MIN _HOME_BTNS_Y_MIN/ROOT_WIN_H +#define HOME_BTNS_Y_MAX _HOME_BTNS_Y_MAX/ROOT_WIN_H +#define HOME_MENU_BTN_X_MIN _HOME_MENU_BTN_X_MIN/ROOT_WIN_W +#define HOME_MENU_BTN_X_MAX _HOME_MENU_BTN_X_MAX/ROOT_WIN_W +#define HOME_HOME_BTN_X_MIN _HOME_HOME_BTN_X_MIN/ROOT_WIN_W +#define HOME_HOME_BTN_X_MAX _HOME_HOME_BTN_X_MAX/ROOT_WIN_W +#define HOME_CHOOSER_CAPTION_Y_MIN _HOME_CHOOSER_CAPTION_Y_MIN/ROOT_WIN_H +#define HOME_CHOOSER_CAPTION_Y_MAX _HOME_CHOOSER_CAPTION_Y_MAX/ROOT_WIN_H + +#define HOME_PG_INDEX_X_MIN _HOME_PG_INDEX_X_MIN/ROOT_WIN_W +#define HOME_PG_INDEX_X_MAX _HOME_PG_INDEX_X_MAX/ROOT_WIN_W + +#define SIGNAL_MENU_BTN_CLICKED "menu_clicked" +#define SIGNAL_HOME_BTN_CLICKED "home_clicked" +#define SIGNAL_CHOOSER_CAPTION_ACTIVATE "chooser,caption,activate" +#define SIGNAL_CHOOSER_CAPTION_DEACTIVATE "chooser,caption,deactivate" + +#define GROUP_HOME_LY "home_ly" +#define PART_CONTENT "content" +#define PART_INDEX "index" +#define PART_EDIT_BG "edit_bg" +#define PART_NEXT_PAGE_INDICE "next_page_indice" +#define PART_PREV_PAGE_INDICE "prev_page_indice" +#define PART_EVENT_BLOCKER "part_event_blocker" +#define PART_CHOOSER_CAPTION_RIGHT_LABEL "chooser_caption_right_label" +#define PART_CHOOSER_CAPTION_LEFT_LABEL "chooser_caption_left_label" +#define PART_CHOOSER_CAPTION_MIDDLE_LABEL "chooser_caption_middle_label" + +#define SIGNAL_EDIT_BG_ON "edit_bg_on" +#define SIGNAL_EDIT_BG_OFF "edit_bg_off" +#define SIGNAL_NEXT_PAGE_INDICE_SHOW "next_page_show" +#define SIGNAL_PREV_PAGE_INDICE_SHOW "prev_page_show" +#define SIGNAL_INDICE_HIDE "page_indice_hide" + +#define SIGNAL_BLOCK_EVENTS "block_home_events" +#define SIGNAL_UNBLOCK_EVENTS "unblock_home_events" + +/*this signals is used for change page on reposition action */ +#define SIGNAL_NEXT_PAGE_CHANGE "next_page_change" +#define SIGNAL_PREV_PAGE_CHANGE "prev_page_change" + +/*these signals change states of bottom buttons (menu and home/all apps) */ +#define SIGNAL_BOTTOM_BUTTONS_HOME_STATE_SET "menu_icon_home_state_set" +#define SIGNAL_BOTTOM_BUTTONS_ALL_APPS_STATE_SET "menu_icon_all_apps_state_set" +#define SIGNAL_BOTTOM_BUTTONS_ALL_APPS_EDIT_STATE_SET "menu_icon_edit_state_set" + +/*========================== LIVEBOX EDC CONFIG ==============================*/ +#define _LIVEBOX_X_MARGIN 6 +#define _LIVEBOX_X_MIN _LIVEBOX_X_MARGIN +#define _LIVEBOX_X_MAX (ROOT_WIN_W - _LIVEBOX_X_MARGIN) + +#define _LIVEBOX_EDIT_X_MARGIN 30 +#define _LIVEBOX_EDIT_Y_MARGIN 30 +#define _LIVEBOX_EDIT_X_MIN _LIVEBOX_EDIT_X_MARGIN +#define _LIVEBOX_EDIT_X_MAX (ROOT_WIN_W - _LIVEBOX_EDIT_X_MARGIN) +#define _LIVEBOX_EDIT_Y_MIN _LIVEBOX_EDIT_X_MARGIN +/*square area of screen width size is required */ +#define _LIVEBOX_EDIT_Y_MAX (ROOT_WIN_W - _LIVEBOX_EDIT_X_MARGIN) + +#define _LIVEBOX_ADD_PAGE_BUTTON_SIZE_HALF 60 +#define _LIVEBOX_ADD_PAGE_BUTTON_X_MIN \ + (ROOT_WIN_W / 2 - _LIVEBOX_ADD_PAGE_BUTTON_SIZE_HALF) +#define _LIVEBOX_ADD_PAGE_BUTTON_X_MAX \ + (ROOT_WIN_W / 2 + _LIVEBOX_ADD_PAGE_BUTTON_SIZE_HALF) +#define _LIVEBOX_ADD_PAGE_BUTTON_Y_MIN \ + (ROOT_WIN_W / 2 - _LIVEBOX_ADD_PAGE_BUTTON_SIZE_HALF) +#define _LIVEBOX_ADD_PAGE_BUTTON_Y_MAX \ + (ROOT_WIN_W / 2 + _LIVEBOX_ADD_PAGE_BUTTON_SIZE_HALF) + +#define LIVEBOX_REMOVE_BUTTON_SIZE 48 +#define LIVEBOX_SLIDER_BUTTON_SIZE 12 +#define LIVEBOX_SLIDER_FRAME_OFFSET_1 5 +#define LIVEBOX_SLIDER_FRAME_OFFSET_2 8 + +#define LIVEBOX_REMOVE_LB_BUTTON_SIZE 24 +#define LIVEBOX_REMOVE_LB_OFFSET_X 9 +#define LIVEBOX_REMOVE_LB_OFFSET_Y 8 + +#define LIVEBOX_REPOSITION_BG_BORDER 10 +#define LIVEBOX_REPOSITION_BG_COLOR 162 +#define LIVEBOX_REPOSITION_SHADOW_COLOR 96 + +#define LIVEBOX_X_MIN _LIVEBOX_X_MIN/ROOT_WIN_W +#define LIVEBOX_X_MAX _LIVEBOX_X_MAX/ROOT_WIN_W + +#define LIVEBOX_EDIT_X_MIN _LIVEBOX_EDIT_X_MIN/ROOT_WIN_W +#define LIVEBOX_EDIT_X_MAX _LIVEBOX_EDIT_X_MAX/ROOT_WIN_W +#define LIVEBOX_EDIT_Y_MIN _LIVEBOX_EDIT_Y_MIN/ROOT_WIN_W +#define LIVEBOX_EDIT_Y_MAX _LIVEBOX_EDIT_Y_MAX/ROOT_WIN_W + +#define LIVEBOX_ADD_PAGE_BUTTON_X_MIN _LIVEBOX_ADD_PAGE_BUTTON_X_MIN/ROOT_WIN_W +#define LIVEBOX_ADD_PAGE_BUTTON_X_MAX _LIVEBOX_ADD_PAGE_BUTTON_X_MAX/ROOT_WIN_W +#define LIVEBOX_ADD_PAGE_BUTTON_Y_MIN _LIVEBOX_ADD_PAGE_BUTTON_Y_MIN/ROOT_WIN_W +#define LIVEBOX_ADD_PAGE_BUTTON_Y_MAX _LIVEBOX_ADD_PAGE_BUTTON_Y_MAX/ROOT_WIN_W + +#define LIVEBOX_RESIZE_FRAME_REL_1 \ + (1.0 * LIVEBOX_SLIDER_FRAME_OFFSET_1 / LIVEBOX_SLIDER_BUTTON_SIZE) +#define LIVEBOX_RESIZE_FRAME_REL_2 \ + (1.0 * LIVEBOX_SLIDER_FRAME_OFFSET_2 / LIVEBOX_SLIDER_BUTTON_SIZE) + +/*========================== APP ICON CONFIG =================================*/ +#define FOLDER_ICON_MAX_MINIATURES 4 + +#define ICON_CONTAINER_W 132 +#define ICON_CONTAINER_H 159 + +#define ICON_BADGE_W 30 +#define ICON_BADGE_H 30 + +#define _ICON_Y_MIN 8 +#define _ICON_Y_MAX 96 +#define _ICON_X_MIN 22 +#define _ICON_X_MAX 110 + +#define _ICON_NAME_X_MIN 6 +#define _ICON_NAME_X_MAX 126 +#define _ICON_NAME_Y_MIN 101 +#define _ICON_NAME_Y_MAX 156 +#define _ICON_NAME_EDIT_Y_MAX 144 + +#define _ICON_UNINSTALL_BTN_X_MAX 60 +#define _ICON_UNINSTALL_BTN_Y_MAX 60 + +#define ICON_Y_MIN _ICON_Y_MIN/ICON_CONTAINER_H +#define ICON_Y_MAX _ICON_Y_MAX/ICON_CONTAINER_H +#define ICON_X_MIN _ICON_X_MIN/ICON_CONTAINER_W +#define ICON_X_MAX _ICON_X_MAX/ICON_CONTAINER_W + +#define ICON_NAME_X_MIN _ICON_NAME_X_MIN/ICON_CONTAINER_W +#define ICON_NAME_X_MAX _ICON_NAME_X_MAX/ICON_CONTAINER_W +#define ICON_NAME_Y_MIN _ICON_NAME_Y_MIN/ICON_CONTAINER_H +#define ICON_NAME_Y_MAX _ICON_NAME_Y_MAX/ICON_CONTAINER_H +#define ICON_NAME_EDIT_Y_MAX _ICON_NAME_EDIT_Y_MAX/ICON_CONTAINER_H + +#define ICON_UNINSTALL_BTN_X_MAX _ICON_UNINSTALL_BTN_X_MAX/ICON_CONTAINER_W +#define ICON_UNINSTALL_BTN_Y_MAX _ICON_UNINSTALL_BTN_Y_MAX/ICON_CONTAINER_H + +#define ICON_BADGE_CHECKBOX_REL1_X 0.6588 +#define ICON_BADGE_CHECKBOX_REL1_Y 0.0498 +#define ICON_BADGE_CHECKBOX_REL2_X 0.9412 +#define ICON_BADGE_CHECKBOX_REL2_Y 0.2886 + +#define GROUP_ICON_LY "app_icon_layout" +#define PART_ICON_CONTENT "icon_content" +#define PART_ICON_NAME "icon_name" + +#define SIGNAL_PRESS_SOURCE "icon_content_touch" + +#define SIGNAL_ICON_PRESS "icon,pressed" +#define SIGNAL_UNINSTALL_BUTTON_SHOW "uninstall_button,show" +#define SIGNAL_UNINSTALL_BUTTON_HIDE "uninstall_button,hide" +#define SIGNAL_UNINSTALL_BUTTON_CLICKED "uninstall_button,clicked" +#define SIGNAL_CHECKBOX_SHOW_UNCHECKED "checkbox,show,unchecked" +#define SIGNAL_CHECKBOX_SHOW_CHECKED "checkbox,show,checked" +#define SIGNAL_CHECKBOX_HIDE "checkbox,hide" +#define SIGNAL_CHECKBOX_CHECKED "checkbox,checked" +#define SIGNAL_CHECKBOX_UNCHECKED "checkbox,unchecked" +#define SIGNAL_CHECKBOX_BLOCK "checkbox,block" +#define SIGNAL_CHECKBOX_UNBLOCK "checkbox,unblock" +#define SIGNAL_LABEL_SHOW "label,show" +#define SIGNAL_LABEL_HIDE "label,hide" +#define SIGNAL_BADGE_SHOW "badge,show" +#define SIGNAL_BADGE_HIDE "badge,hide" +#define SIGNAL_BADGE_FOLDER_SHOW "folder,badge,show" +#define SIGNAL_BADGE_FOLDER_HIDE "folder,badge,hide" +#define SIGNAL_ICON_CLICKED "icon_clicked" +#define SIGNAL_EDIT_MODE_ON "edit_mode_on" +#define SIGNAL_EDIT_MODE_OFF "edit_mode_off" +#define SIGNAL_EDIT_MODE_BLACK_ON "edit_mode_black_on" +#define SIGNAL_EDIT_MODE_BLACK_OFF "edit_mode_black_off" +#define SIGNAL_CHOOSE_MODE_ON "choose_mode_on" +#define SIGNAL_CHOOSE_MODE_OFF "choose_mode_off" +#define SIGNAL_FRAME_POSSIBLE_SHOW "show_frame_possible" +#define SIGNAL_FRAME_IMPOSSIBLE_SHOW "show_frame_impossible" +#define SIGNAL_FRAME_HIDE "hide_frame" +#define SIGNAL_EMPTY_BG_SHOW "empty_bg" +#define SIGNAL_BLACK_TEXT "label,text,black" +#define PART_CAPTION_MENU_CENTER_LABEL_NAME "chooser_caption_middle_label" +#define PART_CAPTION_MENU_LEFT_LABEL "chooser_caption_left_label" +#define PART_CAPTION_MENU_RIGHT_LABEL "chooser_caption_right_label" + +/*========================== INDEX ELEMENT CONFIG ============================*/ +#define INDEX_MAX_PAGE_COUNT 7 +#define SIGNAL_SET_CURRENT "set_current" +#define SIGNAL_SET_DEFAULT "set_default" +#define INDICE_SIZE_SETTER "indice_size_setter" + +#define INDEX_IMAGE IMAGE_DIR"/core_page_indicator_horizontal.png" +#define INDEX_EDJE EDJE_DIR"/index_element.edj" +#define GROUP_INDEX_ELEMENT "index_element" +#define PART_INDEX_ELEMENT "element" + +#define INDEX_ELEMENT_CONTAINER_WIDTH 38.0 +#define INDEX_ELEMENT_CONTAINER_HEIGHT 38.0 + +#define INDEX_CURRENT_SIZE 0.03 +#define INDEX_NORMAL_SIZE 0.015 +#define INDEX_CURRENT_ALPHA 255 +#define INDEX_NORMAL_ALPHA 100 + +/*========================== APP_GRID.EDC CONFIG =============================*/ +#define GROUP_APP_GRID "app_grid_ly" +#define GROUP_APP_GRID_ITEM_CONTAINER "app_grid_item_container" + +#define PART_APP_GRID_BG "app_grid_bg" +#define PART_APP_GRID_EDIT_BG "app_grid_edit_bg" +#define PART_APP_GRID_CONTENT "app_grid_content" +#define PART_APP_GRID_ITEM "app_grid_item" + +#define PART_APP_GRID_SIZE_SETTER "size_setter" + +#define ANIMATION_RESIZE_TIME 0.2 + +/*========================== FOLDER.EDC CONFIG ===============================*/ +#define MINIATURE_COL_1_MIN 0.18 +#define MINIATURE_COL_1_MAX 0.48 +#define MINIATURE_COL_2_MIN 0.52 +#define MINIATURE_COL_2_MAX 0.82 +#define MINIATURE_ROW_1_MIN 0.18 +#define MINIATURE_ROW_1_MAX 0.48 +#define MINIATURE_ROW_2_MIN 0.52 +#define MINIATURE_ROW_2_MAX 0.82 +#define MINIATURE_CENTER_MIN 0.35 +#define MINIATURE_CENTER_MAX 0.65 + +#define FOLDER_HEIGHT 569 + +#define _NAME_Y_MIN 0 +#define _NAME_Y_MAX 62 + +#define _SEPARATOR_Y_MIN 62 +#define _SEPARATOR_Y_MAX 64 + +#define _CONTENT_Y_MIN 69 +#define _CONTENT_Y_MAX 569 + +#define _INDEX_Y_MIN 355 +#define _INDEX_Y_MAX 421 + +#define FOLDER_NAME_Y_MIN _NAME_Y_MIN/FOLDER_HEIGHT +#define FOLDER_NAME_Y_MAX _NAME_Y_MAX/FOLDER_HEIGHT + +#define FOLDER_SEPARATOR_Y_MIN _SEPARATOR_Y_MIN/FOLDER_HEIGHT +#define FOLDER_SEPARATOR_Y_MAX _SEPARATOR_Y_MAX/FOLDER_HEIGHT + +#define FOLDER_CONTENT_Y_MIN _CONTENT_Y_MIN/FOLDER_HEIGHT +#define FOLDER_CONTENT_Y_MAX _CONTENT_Y_MAX/FOLDER_HEIGHT + +#define INDEX_Y_MIN _INDEX_Y_MIN/FOLDER_3_R_IND_HEIGHT +#define INDEX_Y_MAX _INDEX_Y_MAX/FOLDER_3_R_IND_HEIGHT + +#define GROUP_FOLDER_ICON_LAYOUT "folder_icon_layout" +#define GROUP_FOLDER_ADD_ICON "folder_add_icon" +#define GROUP_FOLDER_WINDOW "folder_window" +#define GROUP_FOLDER_POPUP "folder_popup" +#define PART_FOLDER_NAME "folder_name_entry" +#define PART_FOLDER_CONTENT "folder_content" +#define PART_FOLDER_UNNAMED_TEXT "Unnamed folder" + +#define SIGNAL_CLEAR_BTN_SHOW "clear_btn_show" +#define SIGNAL_CLEAR_BTN_HIDE "clear_btn_hide" +#define SIGNAL_CLEAR_BTN_CLICKED "clear_btn_clicked" +#define SIGNAL_ENTRY_BLOCK_ON "folder_entry,block,on" +#define SIGNAL_ENTRY_BLOCK_OFF "folder_entry,block,off" + +#define SIGNAL_BG_CLICKED "bg_clicked" + +#define SIGNAL_FOLDER_PANEL_OPEN "folder_open" +#define SIGNAL_FOLDER_PANEL_CLOSE "folder_close" +#define SIGNAL_FOLDER_ANIM_DONE "anim_done" +#define SIGNAL_FOLDER_UNNAMED_TEXT_SHOW "unnamed_text_show" +#define SIGNAL_FOLDER_UNNAMED_TEXT_HIDE "unnamed_text_hide" + +#define FOLDER_1_ROW_H_REL 0.25875 +#define FOLDER_2_ROW_H_REL 0.42375 +#define FOLDER_3_ROW_H_REL 0.59125 + +#define FOLDER_ROW_W_REL 0.7 +#define FOLDER_POPUP_W_REL 0.9118 +#define FOLDER_POPUP_X_REL 0.0441 + +#define FOLDER_GRID_W_REL 0.9 +#define FOLDER_GRID_H_REL 0.5 +#define FOLDER_ITEM_MARGIN 0.04 + +#define FOLDER_LEFT_MARGIN 0.07 +#define FOLDER_RIGHT_MARGIN 0.93 + +#define FOLDER_WINDOW_W home_screen_get_root_width() +#define FOLDER_WINDOW_H home_screen_get_root_height() + +#define FOLDER_ROW_APPS 3 +#define FOLDER_COL_APPS 3 + +#define POPUP_SHIFT 15 +#define KEYPAD_SPACE 5 +#define DEFAULT_FOLDER_NAME "Unnamed folder" + +/*========================== ALL PAGES EDC ===================================*/ +#define GROUP_ALL_PAGES "page_edit_view" +#define GROUP_GRID_ITEM "grid_item" +#define GROUP_THUMB "thumb" + +#define PART_LAYOUT_CONTENT "content" +#define PART_GRID_ITEM_CONTENT "grid_item_content" +#define PART_THUMB_CONTENT "page_thumbnail" + +#define SIGNAL_BG_HIDE "bg_hide" +#define SIGNAL_BG_NORMAL "bg_normal" +#define SIGNAL_BG_REPOSITON "bg_reposition" +#define SIGNAL_REMOVE_BUTTON_CLICKED "remove_button_clicked" +#define SIGNAL_THUMBNAIL_CLICKED "thumbnail_clicked" +#define SIGNAL_ADD_ICON_SHOW "add_icon_show" +#define SIGNAL_REMOVE_BUTTON_SHOW "remove_button_show" +#define SIGNAL_REMOVE_BUTTON_HIDE "remove_button_hide" +#define SIGNAL_REMOVE_BUTTON_HIDE_INSTANT "remove_button_hide_instant" + +#define BADGE_REL1_X 0.060 +#define BADGE_REL1_Y 0.118 +#define BADGE_REL2_X 0.250 +#define BADGE_REL2_Y 0.284 + +#define ROW_SHIFT 0.45 +#define COL_SHIFT 0.32 +#endif /* CONF_H_ */ diff --git a/inc/data_model.h b/inc/data_model.h new file mode 100644 index 0000000..8b51916 --- /dev/null +++ b/inc/data_model.h @@ -0,0 +1,209 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef DATA_MODEL_H_ +#define DATA_MODEL_H_ + +#include +#include "app_mgr.h" +#include "tree.h" + +typedef enum { + REPOSITION_SIDE_TO_LEFT, + REPOSITION_SIDE_TO_RIGHT +} reposition_side_t; + +/** + * @brief gets data model of the application + */ +extern Tree_node_t *data_model_get_data(void); + +/** + * @brief gets data model for the all apps view. + */ +extern Tree_node_t *data_model_get_all_apps(void); + +/** + * @brief gets data model for the home view. + */ +extern Tree_node_t *data_model_get_home(void); + +/* + * @brief Get applications from app manager + */ +extern void data_model_load_app_mgr(void); + +/* + * @brief Get applications from database + */ +extern Eina_Bool data_model_load_db(void); + +/* + * @brief free entire memory allocated for model structure + * and nodes data + */ +extern void data_model_free(void); + +/** + * @brief Creates folder in the data model/ + */ +extern Tree_node_t *data_model_create_folder(app_item_t *node); + +/** + * @brief Appends an item into the folder. + */ +extern void data_model_append_node_to_folder(Tree_node_t *folder, + Tree_node_t *node); + +/** + * @brief Removes empty pages from the all apps view in the data model. + */ +extern void data_model_free_empty_pages(Tree_node_t *folder_or_some_other_root); + +/* + * @brief Delete folder and move apps to all apps + */ +extern void data_model_delete_folder(Tree_node_t *node); + +/** + * @brief Append an newly installed application to the data model. + */ +extern Tree_node_t *data_model_install_application( + app_mgr_item_t *app_mgr_item); + +/** + * @brief Uninstall an application + */ +extern void data_model_uninstall_application(Tree_node_t *node); + +/* + * @brief set checked state to all icons + */ +extern void data_model_check_all_apps(Tree_node_t *node, bool checked); + +/** + * @brief returns count of checked applications in the all apps edit mode view. + */ +extern int data_model_get_app_check_state(void); + +/** + * @brief change position of an application + */ +extern void data_model_reposition_item(Tree_node_t *node, + Tree_node_t *destinations_parent, Tree_node_t *destination, + reposition_side_t side, int page_limit); + +/** + * @brief set the view type of the data models items + */ +extern void data_model_set_view_mode(homescreen_view_t view); + +/** + * @brief iterates over the whole tree and applies func_cb over each node + * @param node - tree node, pass NULL if You want + * to start from the root of the model tree + * @param func_cb - function to call on each node + * @param data - data - to be passed to func_cb + * @details [long description] + */ +extern void data_model_iterate(Tree_node_t *node, tree_browse_cb_t func_cb, + void *data); + +/** + * @brief This one takes pages abstraction into account. + * Iterates through pages, and it's items. + * @param node - tree node, pass NULL if You want + * to start from the root of the model tree + * @param item_func - function to call on each item + * @param page_func - function to call on each page + * @param data - data - to be passed to func_cb + */ +extern void data_model_iterate_pages(Tree_node_t *node, + tree_browse_cb_t page_func, tree_browse_cb_t item_func, void *data); + +/** + * @brief sorts in place using sort_compare_function + */ +extern void data_model_sort(Eina_Compare_Cb sort_compare_function); + +/** + * @brief Creates new page + * @details Creates new page node, adds it to the tree structure and + * returns the created page + * @return new page node + */ +extern Tree_node_t *data_model_add_widget_page(void); + +/** + * @brief Creates new widget and adds it to @p page + * @param page Page the new widget will be added to + * @param widget_id Created widget + * @param col column to put widget in + * @param row row to put widget in + * @param col_span column span of widget + * @param row_span row span of widget + * @return New widget node + */ +extern Tree_node_t *data_model_add_widget(Tree_node_t *page, + const char *widget_id, int col, int row, int col_span, int row_span, + const char *content_info); + +/** + * @brief [brief description] + * @details [long description] + */ +extern void data_model_reposition_widget(Tree_node_t *page_node, + Tree_node_t *obj_node); + +/** + * @brief [brief description] + * @details [long description] + */ +extern void data_model_resize_widget(Tree_node_t *item_node, int col, int row, + int col_span, int row_span); + +extern void data_model_update_content_info(Tree_node_t *item_node, const char *content_info); + +/** + * @brief [brief description] + * @details [long description] + */ +extern void data_model_insert_after(Tree_node_t *prev_node, + Tree_node_t *item_node); + +/** + * @brief [brief description] + * @details [long description] + */ +extern void data_model_del_item(Tree_node_t *node); + +/** + * @brief [brief description] + * @details [long description] + */ +extern void data_model_update_item(Tree_node_t *node); + +/** + * @brief Unpin a repositioned node from the folder. + * + * @param folder_node Folder node pointer. + * @param node repositioned node pointer. + */ +extern void data_model_detach_from_folder(Tree_node_t *folder_node, + Tree_node_t *node); + + +#endif /* DATA_MODEL_H_ */ diff --git a/inc/db/db.h b/inc/db/db.h new file mode 100644 index 0000000..be9e17c --- /dev/null +++ b/inc/db/db.h @@ -0,0 +1,64 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __DB_H__ +#define __DB_H__ + +#include "app_item.h" +#include "util.h" + +typedef struct +{ + int id; + app_item_type_t type; + char *appid; + + int first_id; + int next_id; + + int x; + int y; + int w; + int h; + + char *content_info; +} db_item_t; + +/** + * @brief Create database table + */ +extern bool db_create_tables(void); + +/** + * @brief Get the applications list from the database + * @param apps Eina_List pointer + */ +extern bool db_get_apps(Eina_List **apps); + +/** + * @brief Frees the application list + * @param apps Pointer to Eina_List. + */ +extern void db_free_apps(Eina_List *apps); + +/** + * @brief Updates the database + * @param updated item + * @param insert flag. + */ +extern bool db_update_apps(db_item_t item, bool insert); + +#endif /* __DB_H__ */ diff --git a/inc/dynamic_index.h b/inc/dynamic_index.h new file mode 100644 index 0000000..fdd47af --- /dev/null +++ b/inc/dynamic_index.h @@ -0,0 +1,56 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef DYNAMIC_INDEX_H_ +#define DYNAMIC_INDEX_H_ + +#include +#include + +#include "page_scroller.h" +#include "conf.h" + +typedef struct { + Evas_Object *scroller; + Evas_Object *box; + Evas_Object *indices[INDEX_MAX_PAGE_COUNT]; + int page_count; + int page_width; + int page_current; + int x_current; +} dynamic_index_t; + +/** + * @brief Creates new dynamic index object + * @param page_scroller Evas_Object pointer to elm_scroller widget + */ +dynamic_index_t *dynamic_index_new(Evas_Object *page_scroller); + +/** + * @brief Removes dynamic inxed object + * @param dynamic_index Pointer to dynamic_index_t type. + */ +void dynamic_index_del(dynamic_index_t *dynamic_index); + +/** + * @brief Clears content and set current index. + * @details [long description] + * + * @param dynamic_index [description] + */ +void dynamic_index_reload(dynamic_index_t *dynamic_index, int idx, int page_count); + +#endif /* DYNAMIC_INDEX_H_ */ diff --git a/inc/folder_panel.h b/inc/folder_panel.h new file mode 100644 index 0000000..8d7a3fc --- /dev/null +++ b/inc/folder_panel.h @@ -0,0 +1,133 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __FOLDER_PANEL_H__ +#define __FOLDER_PANEL_H__ + +#include +#include "homescreen-efl.h" +#include "app_item.h" +#include "dynamic_index.h" +#include "tree.h" + +typedef struct { + Eina_List *miniatures; + Evas_Object *folder_scroller; +} folder_data_t; + +/** + * @brief Initializes folder module + */ +void folder_panel_init_module(void); + +/** + * @brief Frees all data initialized before. + */ +void folder_panel_deinit_module(void); + +/** + * @brief Creates folder panel. + * @param data folder parent in data model + * @return app_item_t pointer + */ +extern app_item_t *folder_panel_create(Tree_node_t *data); + +/** + * @brief Ignores folder click action if ignore is true. +*/ +extern void folder_panel_set_click_ignore_state(bool ignore); + +/** + * @brief Enables or disables folder entry editing. + * @param state the state to put folder entry in + */ +extern void folder_panel_enable_entry(bool state); + +/** + * @brief Attaches icon object to grid of currently opened folder. + * @param icon - app_item_t->layout + */ +extern Elm_Object_Item *folder_panel_attach_to_grid(Evas_Object *icon, + folder_data_t *folder_data); + +/** + * @brief Shows folder panel layout on screen + * @param folder pointer to app_item_t object + * @param keypad_show imf keyboard visibility flatg + * + * @return true if no errors. + */ +extern bool folder_panel_open_folder(app_item_t *folder, bool keypad_show); + +/** + * @brief Closes folder panel view. + */ +extern void folder_panel_close_folder(void); + +/** + * @brief Cancels appending new items into the folder by add icon press. + */ +extern void folder_panel_cancel_add_icon(void); + +/** + * @brief Returns folder visibility state + * @return true if folder is visible otherwise returns false + */ +extern bool folder_panel_is_folder_visible(void); + +/** + * @brief Shows checkboxes on the folder icon. + */ +extern bool folder_panel_set_content_checked(Tree_node_t *node); + +/** + * @brief Function returns pointer to data node of the opened folder + * @return Tree_Node_t pointer. + */ +extern Tree_node_t *folder_panel_get_opened_folder_node(void); + +/** + * @brief Function returns pointer to app_item of opened folder + */ +extern const app_item_t *folder_panel_get_opened_folder_item(void); + +/** + * @brief Return number of items inserted into the folder. + */ +extern int folder_panel_get_items_count(Tree_node_t *folder); + +/** + * @brief Removes empty folder after reposition. + */ +extern void folder_panel_remove_empty_folder(Tree_node_t *folder); + +/** + * @brief Return folder popup geometry + * + * @param x position + * @param y position + * @param w width + * @param h height + */ +extern void folder_panel_get_folder_geometry(int *x, int *y, int *w, int *h); + +/** + * @brief Function close entry input panel connected with folder name entry + * widget + */ +extern void folder_panel_hide_input_panel(void); + +#endif /* FOLDER_PANEL_H_ */ diff --git a/inc/homescreen-efl.h b/inc/homescreen-efl.h new file mode 100644 index 0000000..944d47c --- /dev/null +++ b/inc/homescreen-efl.h @@ -0,0 +1,147 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __HOMESCREEN_EFL_H__ +#define __HOMESCREEN_EFL_H__ + +#include +#include + +#include +#include + +#include "conf.h" +#include "app_item.h" +#include "tree.h" + +#ifdef LOG_TAG +#undef LOG_TAG +#endif +#define LOG_TAG "HOMESCREEN_EFL" + +#if !defined(PACKAGE) +#define PACKAGE "org.tizen.homescreen-efl" +#endif + +typedef enum { + HOMESCREEN_VIEW_HOME = 0, + HOMESCREEN_VIEW_HOME_EDIT, + HOMESCREEN_VIEW_HOME_ALL_PAGES, + HOMESCREEN_VIEW_ALL_APPS, + HOMESCREEN_VIEW_ALL_APPS_EDIT, + HOMESCREEN_VIEW_ALL_APPS_CHOOSE, + HOMESCREEN_VIEW_UNKNOWN, +} homescreen_view_t; + +typedef enum { + INDICE_NEXT_PAGE_ON = 0, + INDICE_PREV_PAGE_ON, + INDICE_OFF, +} indice_type_t; + +/** + * @return returns screen width + */ +extern int home_screen_get_root_width(void); + +/** + * @return returns screen height + */ +extern int home_screen_get_root_height(void); + +/** + * @brief Returns homescreen window pointer. + * @return Evas_Object pointer to elm_win widget or NULL if falsse + */ +extern Evas_Object *home_screen_get_win(void); + +/** + * @brief Returns elm_win main layout. + * @details Function returns pointer to elm_layout widget with is a parent + * for other views used in home + * @return Evas_Object pointer to elm_layout widget + */ +extern Evas_Object *home_screen_get_layout(void); + +/** + * @brief Returns homescreen view type + * @details Possible types : + * + *HOMESCREEN_VIEW_HOME, + *HOMESCREEN_VIEW_HOME_EDIT, + *HOMESCREEN_VIEW_HOME_ALL_PAGES, + *HOMESCREEN_VIEW_ALL_APPS, + *HOMESCREEN_VIEW_ALL_APPS_EDIT, + *HOMESCREEN_VIEW_ALL_APPS_CREATE_FOLDER, + *HOMESCREEN_VIEW_UNKNOWN, + * + * @return homescreen_view_t value + */ +extern homescreen_view_t home_screen_get_view_type(void); + +/** + * @brief set homescreen view type + * @param view homescreen_view_t type + */ +extern void home_screen_set_view_type(homescreen_view_t view); + +/** + * @brief Function sets indice state + * @details During page switching left or right side of the screen should be + * highlighted. This function is repsponsible for this logic. + * + * @param indice type of performed action + */ +extern void home_screen_set_indice_state(indice_type_t indice); + +/** + * @brief Update the view after application uninstall + */ +extern void home_screen_mvc_item_uninstall_cb(Tree_node_t *item); + +/** + * @brief Update view after folder name change + */ +extern void home_screen_mvc_update_view(void); + +/** + * @brief Update view after move an item into the folder + */ +extern void home_screen_mvc_drag_item_to_folder_cb(Tree_node_t *dragged_item, + Tree_node_t *folder); + +/** + * @brief home branch test function + * @details Function for debug purpose only. Displays + * the data stored in home branch of the data model tree + */ +extern void home_screen_print_tree(void); + +/** + * @brief Function updates the view after drag an item from the folder. + */ +extern void home_screen_mvc_drag_item_from_folder_cb(void); + +/** + * @brief Multi resolution support function for texts in edje. + * + * @param layout Elm_Layout Pointer + */ +extern void home_screen_mvc_set_ly_scale(Evas_Object *layout); + + + +#endif /* __homescreen-efl_H__ */ diff --git a/inc/key.h b/inc/key.h new file mode 100644 index 0000000..ee4d38e --- /dev/null +++ b/inc/key.h @@ -0,0 +1,30 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef KEY_H_ +#define KEY_H_ + +/** + * @brief Registers the key module and all callbacks related to to hw keys. + */ +void key_register(void); + +/** + * @brief Unregisters all callbacks related to hw keys. + */ +void key_unregister(void); + +#endif /* KEY_H_ */ diff --git a/inc/layout.h b/inc/layout.h new file mode 100644 index 0000000..b09f5ed --- /dev/null +++ b/inc/layout.h @@ -0,0 +1,33 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LAYOUT_H_ +#define LAYOUT_H_ + +#include +#include + +/** + * @brief Sets text in caption menu + * If a parameter is NULL, that parameter won't be set + */ +extern void layout_main_caption_set_menu_texts( + const char *label_text, + const char *left_text, + const char *right_text); + + +#endif /* LAYOUT_H_ */ diff --git a/inc/livebox/grid_item_resize.h b/inc/livebox/grid_item_resize.h new file mode 100644 index 0000000..9e84cb4 --- /dev/null +++ b/inc/livebox/grid_item_resize.h @@ -0,0 +1,52 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef GRID_ITEM_RESIZE_H_ +#define GRID_ITEM_RESIZE_H_ + +#include +#include +#include + +#include "../util.h" +#include "livebox_utils.h" +#include "../conf.h" + +/** + * @brief Adds callbacks to livebox_container + * @param livebox_scroller scroller with livebox_container + * @param livebox_container Layout created with file: livebox_container.edj, + * with grid as its main part + * @return true on success + */ +extern bool grid_item_init_resize_callbacks(Evas_Object *livebox_scroller, + Evas_Object *livebox_container); + +/** + * @brief Set the resize sliders on @p page based on @p livebox geometry + */ +extern void grid_item_set_resize_livebox_sliders(Evas_Object *livebox, + Evas_Object *page); + +/** + * @brief Set the visibility of resize frame + * @param page Page containing the frame + * @param visible Visibility of the frame + */ +extern void grid_item_set_resize_sliders_visibility(Evas_Object *page, + bool visible); + +#endif /* GRID_ITEM_RESIZE_H_ */ diff --git a/inc/livebox/grid_reposition.h b/inc/livebox/grid_reposition.h new file mode 100644 index 0000000..b090d06 --- /dev/null +++ b/inc/livebox/grid_reposition.h @@ -0,0 +1,79 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef GRID_REPOSITION_H_ +#define GRID_REPOSITION_H_ + +#include + +/** + * @brief Returns the grid that the repositioned object will be packed to + * @return origination elm_grid or NULL on error + */ +extern Evas_Object *grid_reposition_get_current_grid(void); + +/** + * @brief Returns the currently repositioned object + * @return origination elm_grid or NULL on error or if there is no + * repositioned object +*/ +extern Evas_Object *grid_reposition_get_repositioned_item(void); + +/** + * @brief Initialize the reposition process + * @details + * Function call order: + * @code + * grid_reposition_init() + * -> grid_reposition_start() -> grid_reposition_move() -> grid_reposition_end() + * @endcode + * + * grid_reposition_move() should be called on mouse move + * + * @param grid + * @param repositioned_item + */ +extern void grid_reposition_init(Evas_Object *grid, Evas_Object + *repositioned_item); + +/** + * @brief Start the reposition process + * @details Check the grid_reposition_init() function + * + */ +extern void grid_reposition_start(void); + +/** + * @brief Move the repositioned object + * @details Check the grid_reposition_init() function + * @param mouse_x + * @param mouse_y + */ +extern void grid_reposition_move(int mouse_x, int mouse_y); + +/** + * @brief End the reposition object + * @details Check the grid_reposition_init() function + */ +extern void grid_reposition_end(void); + +/** + * @brief Sets the grid that the repostioned object will be dropped to + * @param grid must be elm_grid + */ +extern void grid_reposition_set_current_grid(Evas_Object *grid); + +#endif /* GRID_REPOSITION_H_ */ diff --git a/inc/livebox/livebox_animator.h b/inc/livebox/livebox_animator.h new file mode 100644 index 0000000..c2a358a --- /dev/null +++ b/inc/livebox/livebox_animator.h @@ -0,0 +1,86 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LIVEBOX_ANIMATOR_H_ +#define LIVEBOX_ANIMATOR_H_ + +struct _Anim_Data; + +typedef void (*Anim_Grid_End)(struct _Anim_Data **ad); + +typedef struct _Anim_Data { + double anim_time; + Evas_Object *obj; + Ecore_Pos_Map map; + double map_var_1; + double map_var_2; + Eina_Rectangle *geometry_start; + Eina_Rectangle *geometry_end; + Anim_Grid_End on_end; + Ecore_Animator *animator; + bool anim_is_running; +} Anim_Data_t; + +/** + * @brief Delete an animator + * @param ad Animator to delete + */ +extern void livebox_animator_del_grid(Anim_Data_t **ad); + +/** + * @brief creates a grid animator and starts it + * @details Animator will be performed on grid item. It works by packing + * an item to grid's virtual resolution. + * Notice that the animated item has to be packed to a grid before the + * animation starts + * @param obj object to animate + * @param anim_time animation time + * @param map animator mapping method + * @param map_var_1 value used by map + * @param map_var_2 value used by map + * @param geometry_start animator start position + * @param geometry_end animator end position + * @param on_end callback called on end of animation + * @param ad_out created animator object + */ +extern void livebox_animator_play_grid_pack_set(Evas_Object *obj, + float anim_time, + Ecore_Pos_Map map, float map_var_1, float map_var_2, + Eina_Rectangle *geometry_start, Eina_Rectangle *geometry_end, + Anim_Grid_End on_end, + Anim_Data_t **ad_out); + +/** + * @brief creates a geometry animator and starts it + * @details object position and size will be animated + * @param obj object ot animate + * @param anim_time animation time + * @param map animator mapping method + * @param map_var_1 value used by map + * @param map_var_2 value used by map + * @param geometry_start animator start position + * @param geometry_end animator end position + * @param on_end callback called on end of animation + * @param ad_out created animator object + */ +extern void livebox_animator_play_geometry_set(Evas_Object *obj, + float anim_time, + Ecore_Pos_Map map, float map_var_1, float map_var_2, + Eina_Rectangle *geometry_start, Eina_Rectangle *geometry_end, + Anim_Grid_End on_end, + Anim_Data_t **ad_out); + +#endif /* LIVEBOX_ANIMATOR_H_ */ diff --git a/inc/livebox/livebox_panel.h b/inc/livebox/livebox_panel.h new file mode 100644 index 0000000..dd7a92a --- /dev/null +++ b/inc/livebox/livebox_panel.h @@ -0,0 +1,216 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __LIVEBOX_PANEL_H__ +#define __LIVEBOX_PANEL_H__ + +#include +#include "tree.h" + +/** + * @brief creates main livebox view + * @details Creates the livebox scroller and adds pages with liveboxes to it + * @param parent Layout where the livebox panel will be added + * @return Created livebox view or NULL on error + */ +extern Evas_Object *livebox_panel_create(Evas_Object *parent); + +/** + * @brief [brief description] + * @details [long description] + */ +extern void livebox_panel_fill(void); + +/** + * + */ +void livebox_panel_update_dynamic_index(void); + + +/** + * @brief Creates dynamic index for livebox panel + */ +extern void livebox_panel_create_dynamic_index(void); + +/** + * @brief Sets livebox panel and its dynamic index to layout + * @note @p layout has to have "content" and "index" parts + * @param layout layout to add widgets to + */ +extern void livebox_panel_set_content(Evas_Object *layout); + +/** + * @brief Unsets livebox panel and its dynamic index from layout + * @note @p layout has to have "content" and "index" parts + * @param layout layout to remove widgets from + */ +extern void livebox_panel_unset_content(Evas_Object *layout); + +/** + * @brief Create empty livebox scroller + * @return The created scroller or null on error + */ +extern Evas_Object *livebox_panel_create_scroller(void); + +/** + * @brief destroys the livebox scroller and all of it pages + */ +extern void livebox_panel_destroy(void); + +/** + * Adds new livebox to @p page + * @param node widget representation in data structure + * @param page Page where livebox will be added + * @param livebox_pkgname livebo pkgname + * @param pos_x position in grid + * @param pos_y position in grid + * @param width width of livebox in grid + * @param height height of livebox in grid + */ +void livebox_panel_add_livebox(Tree_node_t *node, Evas_Object *page, + const char *livebox_pkgname, int pos_x, int pos_y, + int width, int height, + char *content_info); + +/** + * @brief Creates new livebox page + * @param node page representation in data structure + * @param livebox_scroller + * @return new empty page + */ +extern Evas_Object *livebox_panel_add_page(Tree_node_t *node, + Evas_Object *livebox_scroller); + +/** + * @brief adds an empty page (page layout is described in @p + * livebox_container.edc to the @p livebox_scroller + * @param livebox_scroller Scroller to which thepage is added + * @return TRUE on success FALSE otherwise + */ +extern bool livebox_panel_add_empty_page(Evas_Object *livebox_scroller); + +/** + * @brief Creates an empty page but doesn't add it to the scoller + * @param node page node in the data model + * @param livebox_scroller Scroller to which the page can be appended + * @return + */ +extern Evas_Object *livebox_panel_create_empty_page(Tree_node_t *node, + Evas_Object *livebox_scroller); + +/** + * @brief Changes the view mode of the livebox page + * @param turn_on True - edit mode on False - edit mode off + */ +extern void livebox_panel_set_edit_mode_layout(bool turn_on); + +/** + * @brief Changes the view mode of the livebox scroller + * @param close True - edit mode off False - edit mode on + */ +extern void livebox_panel_change_edit_mode_state(bool close); + +/** + * @brief Destroys given livebox page and all its content + * @param livebox_scroller_page page to destroy + */ +extern void livebox_panel_destroy_page(Evas_Object *livebox_scroller_page); + +/** + * @brief Function sets the reposition data + * @param x mouse position x + * @param y mouse position y + */ +extern void livebox_panel_move_mouse_cb(int x, int y); + +/** + * @brief sets the pages geometry based on scroller geometry that consits them + */ +extern void livebox_panel_refresh_content_size(void); + +/** + * @brief Returns list of all pages in livebox panel + * @return Eina_List pointer of all livebox pages + */ +extern Eina_List *livebox_panel_get_pages(void); + +/** + * @brief Gets the livebox dynamic index + * @return Pointer to dynamic index box + */ +extern Evas_Object *livebox_panel_get_index(void); + +/** + * @brief Gets the livebox panel elm_scroller widget + * @return Pointer to elm_scroller with livebox pages + */ +extern Evas_Object *livebox_panel_get(void); + +/** + * @brief Function return true if add page is visible. + */ +extern bool livebox_panel_check_if_add_page_is_visible(void); + +/** + * @brief hide and shows add page button + * @param visible true - show false -hide + */ +void livebox_panel_add_page_visible_state_set(bool visible); + +/** + * @brief Returns true if 'add_page' is the curently selected livebox page + */ +extern bool livebox_panel_is_add_page_selected(void); + +/** + * Gets the current livebox page + * @return Current scroller page + */ +extern Evas_Object *livebox_scroller_get_page(void); + +/** + * Returns the last page of the livebox_scroller + * @return last page or NULL on error + */ +Evas_Object *livebox_scroller_get_last_page(void); + +/** + * Check if a new widget page can be added. Shows a popup if not + * @return true if page can be added, false if not + */ +extern bool livebox_panel_can_add_page(void); + +/** + * Looks for empty space to put new widget to + * + * @param span_w widget size + * @param span_h widget height + * @param pos_x position to put new widget + * @param pos_y position to put new widget + * @return Index of page where new widget can be placed + */ +extern int livebox_panel_find_empty_space(int span_w, int span_h, + int *pos_x, int *pos_y); + +/** + */ +extern void livebox_panel_resumed(void); + +/** + */ +extern void livebox_panel_paused(void); + +#endif diff --git a/inc/livebox/livebox_utils.h b/inc/livebox/livebox_utils.h new file mode 100644 index 0000000..25eae56 --- /dev/null +++ b/inc/livebox/livebox_utils.h @@ -0,0 +1,259 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef UTILS_H_ +#define UTILS_H_ + +#include + +#include "../util.h" +#include "../conf.h" + +/** + * @brief Check interection between @p rect and list items bounding + * Eina_Rectangles + * @details Check interection between @p rect and list items bounding + * Eina_Rectangle. + * If current list item == @p obj the intersection check won't be performed. + * By standard the @p rect is the @p obj bounding rectangle. + * So this helps to avoid interesction check with obj itself + * @param rect rectangle + * @param obj filter object. Can be NULL + * @param list of objects + * @return TRUE if intersection was found ELSE otherwise + */ +extern bool livebox_utils_check_rect_list_grid_interesction( + Eina_Rectangle *rect, Evas_Object *obj, Eina_List *list); + +/** + * @brief Returns the list of liveboxes on grid + * @details Function returns liveboxes put on @p grid but but without the + * @a shadow object + * @param grid + * @return list of liveboxes. Has to be freed + */ +extern Eina_List *livebox_utils_get_liveboxes_on_gird(Evas_Object *grid); + +/** + * @brief Returns the list of liveboxes on page + * @details Page is a layout described by "livebox_container.edc" Which + * contains a elm_grid object. All objects in the grid are returned. + * @param obj livebox page + * @return list of liveboxes. Has to be freed + */ +extern Eina_List *livebox_utils_get_liveboxes_on_page_list(Evas_Object *obj); + + +/** + * @brief Returns the livebox container that contains the selected livebox + * @return Livebox container + */ +extern Evas_Object *livebox_utils_get_selected_livebox_layout(void); + +/** + * @brief Returns the that previously contained the selected livebox. + * Used when livebox in repositioned to different container + * @return Livebox container + */ +extern Evas_Object *livebox_utils_get_prev_livebox_layout(void); + +/** + * @brief Returns the selected livebox + * @return selected livebox + */ +extern Evas_Object *livebox_utils_selected_livebox_get(void); + +/** + * @brief Sets the selected livebox + * @note Use this when livebox is selected + * @param livebox Selected livebox + * @param layout livbox container holding the selected livebox + */ +extern void livebox_utils_set_selected_livebox(Evas_Object *livebox, + Evas_Object *layout); + +/** + * @brief Crate the shadow visible when a object is repositioned + * @param parent Shadow parent + */ +extern void livebox_utils_create_shadow(Evas_Object *parent); + +/** + * @brief Pack the shadow object to given container based on livebox position + * @note Used in reposition + * @param livebox item repositioned using drag&drop + * @param page container where the shadow will be packed + */ +extern void livebox_utils_set_shadow_pack(Evas_Object *livebox, + Evas_Object *page); + +/** + * @brief Shadow is repacked from one livebox_container to different one + * @details Shadow object is unpacked from its current grid and packed to grid + * in page_to livebox_container + * @param livebox livebox item repositioned using drag&drop + * @param page_to livebo_container where the shadow will be packed + */ +extern void livebox_utils_repack_shadow(Evas_Object *livebox, + Evas_Object *page_to); + +/** + * @brief Sets the visiblity of the shadow object + * @param visible TRUE shadow will be visible + */ +extern void livebox_utils_set_shadow_visibility(bool visible); + +/** + * @brief Creates the clipper for the shadow object + * @details The clipper is added to the @p livebox_container and is clipped + * by the shadow object. + * This way only the part of the clipper will be visible where the repositioned + * livebox can be dropped + * @param livebox_container Layout containing the clipper + */ +extern void livebox_utils_create_grid_shadow_clipper(Evas_Object* + livebox_container); + +/** + * @brief Returns position fitting given grid + * @details The input parameteters should be given in virtual coordinates of + * a grid. If the item coordinates don't fit the grid they will be modified + * properly. + * @code + * if(obj_x < 0) + * { + * *out_x = 0; + * } + * + * if obj_x + obj_w > grid_width + * { + * *out_x = grid_width - obj_w + * } + * @endcode + * + * @param[in] obj_x + * @param[in] obj_y + * @param[in] obj_w + * @param[in] obj_h + * @param[out] out_x + * @param[out] out_y + */ +extern void livebox_utils_normalize_grid_pos(int obj_x, int obj_y, int obj_w, + int obj_h, int *out_x, int *out_y); + +/** + * @brief Returns the grid put into the @p container widget + * @param container The container wodth grid + * @return Grid object or NULL on error + */ +extern Evas_Object *livebox_utils_get_livebox_container_grid(Evas_Object *container); + +/** + * @brief Returns the shadow object + * @return shadow object + */ +extern Evas_Object *livebox_utils_get_shadow(void); + +/** + * @brief unpacks the grid object from the grid its currently packed to + */ +extern void livebox_utils_shadow_unpack(void); + +/** + * @brief Transforms the @p livebox geometry to @p grid virtual coordinates + * @param[in] livebox object to read the geometry from + * @param[in] grid elm_grid which virtual coordinates will be used + * @param[out] out_x @p livebox transformed horizontal position + * @param[out] out_y @p livebox transformed vertical position + * @param[out] out_w @p livebox transformed width + * @param[out] out_h @p livebox transformed height + */ +extern void livebox_utils_convert_size_to_grid_coord(Evas_Object *livebox, + Evas_Object *grid, int *out_x, int *out_y, int *out_w, int *out_h); + +/** + * @brief Sets the packing of @p item_to_pack to the @p grid + * @details The @p livebox object is used to determine the position of @p + * item_to_pack in the @p grid. + * Note that the @p item_to_pack has to be packet in the gird allready + * @param livebox Position of this object will be used to determine the + * position of @p item_to_pack in the @p grid + * @param item_to_pack Object to be packed to the @p grid + * @param grid The grid object. Must be elm_grid + */ +extern void livebox_utils_set_grid_object_pack(Evas_Object *livebox, + Evas_Object *item_to_pack, Evas_Object *grid); + +/** + * @brief Repacks @p item_to_pack from @p grid_from to @p grid_to + * @details The @p livebox object is used to determine the position of @p + * item_to_pack in the @p grid_to. + * The item_to_pack will be unpacked from @p grid_from and @p packed to @p + * grid_to + * + * @param livebox ivebox Position of this object will be used to determine + * the position of @p item_to_pack in the @p grid_to + * @param item_to_pack Repacked item + * @param grid_from Source grid + * @param grid_to D Destination grid + */ +extern void livebox_utils_repack_grid_object(Evas_Object *livebox, + Evas_Object *item_to_pack, Evas_Object *grid_from, + Evas_Object *grid_to); + +/** + * @brief Transforms virtual @ grid virtual coordinates to screen coordinates + * @param grid elm_grid + * @param x Horizontal position in @p grid + * @param y Vertical position in @p grid + * @param w Width in @p grid + * @param h Height in @p grid + * @return Eina_Rectangle containing the postion transformed + * to screen coordinates + */ +extern Eina_Rectangle *livebox_utils_convert_virtual_grid_geo_to_screen( + Evas_Object *grid, int x, int y, int w, int h); + +/** + * @brief Returns the bounding rectangle of the @p obj object + * @details Bounding rectangle contains (x position, y position, width, height) + * of the @p obj + * @param obj to get the bounding rectangle from + * @return Bounding rectangle + */ +extern Eina_Rectangle *livebox_utils_get_widget_rectangle(Evas_Object *obj); + +/** + * @brief Returns the bounding rectangle of the @p obj object in grid virtual + * coordinates + * @details Bounding rectangle contains (x position, y position, width, height) + * of the @p obj. + * @p Obj has to be packed into a grid. + * @param obj to get the bounding rectangle from + * @return Bounding rectangle + */ +extern Eina_Rectangle *livebox_utils_get_grid_widget_rectangle( + Evas_Object *obj); + +/** + * @brief get the current cursor position + * @param mx position x + * @param my position y + */ +extern void livebox_utils_get_cursor_pos(int *mx, int *my); + + +#endif /* UTILS_H_ */ diff --git a/inc/livebox/livebox_widget.h b/inc/livebox/livebox_widget.h new file mode 100644 index 0000000..2c346a6 --- /dev/null +++ b/inc/livebox/livebox_widget.h @@ -0,0 +1,97 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LIVEBOX_WIDGET_H_ +#define LIVEBOX_WIDGET_H_ + +#include +#include + +typedef struct { + char *pkg_id; + char *widget_id; + int is_prime; + int width; + int height; +} widget_info_t; + +/** + * @brief Initializes the widget module. + */ +extern void livebox_widget_init(void); + +/** + * @brief Frees all data initialized for widget module. + */ +extern void livebox_widget_fini(void); + +/** + * @brief Gets the widgets list from the widget service + * @return Eina_List pointer + */ +extern Eina_List *livebox_widget_get_list(void); + +/** + * @brief Cretes new widget and add it to the parent. + * + * @param pkg_name char pointer to package name of the widget + * @param parent pointer to parent Evas_Object + * @param content info + * + * @return pointer to created widget's Evas_Object + */ +extern Evas_Object *livebox_widget_add(const char *pkg_name, Evas_Object *parent, char *content_info); + +/** + * @brief Removes the widget and its data. + * + * @param Widget's Evas_Object pointer. + */ +extern void livebox_widget_del(Evas_Object *widget); + +/** + * @brief Gets the widget size. + * + * @param size type + * @param x - x size in pixels. + * @param y - y size in pixels. + */ +extern void livebox_widget_get_dimensions(int size, int *x, int *y); + +/** + * @brief Gets the available sizes of the widget + * @param widget Evas_Object pointer to the widget object. + * @param cnt number of available widget sizes + * @param size_list sizes list. + */ +extern void livebox_widget_get_size_available(Evas_Object *widget, int *cnt, int **size_list); + + +/** + * @brief Blocks the mouse_up event for given widget + * @param widget widget to block events for + */ +extern void livebox_widget_set_event_blocking(Evas_Object *widget); + +/** + */ +extern void livebox_widget_viewer_paused(void); + +/** + */ +extern void livebox_widget_viewer_resumed(void); + +#endif /* LIVEBOX_WIDGET_H_ */ diff --git a/inc/livebox_all_pages.h b/inc/livebox_all_pages.h new file mode 100644 index 0000000..c8fd5b6 --- /dev/null +++ b/inc/livebox_all_pages.h @@ -0,0 +1,57 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LIVEBOX_ALL_PAGES_H_ +#define LIVEBOX_ALL_PAGES_H_ + +#include +#include + +/** + * @brief Shows all pages panel + * @return Pointer to all_pages layout + */ +extern Evas_Object *livebox_all_pages_show(void); + +/** + * @brief Hides all pages layout + * @param page_index if this value is bigger than 0 it closes the all pages view and sets page index as current home page + */ +extern void livebox_all_pages_hide(void); + +/** + * @brief Check if page at index is an add_page + * @param index page index + * @return true if given index indicates add page + */ +extern bool livebox_all_pages_is_add_icon_page(int index); + +/** + * @brief Function used for moves page thumb during reposition. + * @param x int value of x mouse position + * @param y int value of y mouse position + */ +extern void livebox_all_pages_move_item(int x, int y); + +/** + * @brief Set item to proper position + * + */ +extern void livebox_all_pages_up_item(void); + + + +#endif /* LIVEBOX_ALL_PAGES_H_ */ diff --git a/inc/mouse.h b/inc/mouse.h new file mode 100644 index 0000000..d792ce1 --- /dev/null +++ b/inc/mouse.h @@ -0,0 +1,36 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef MOUSE_H_ +#define MOUSE_H_ + +#include + +#include "util.h" + +/** + * @brief Registers all mouse related callbacks. + */ +extern void mouse_register(void); + +/** + * @brief Unregisters all mouse related callbacks. + */ +extern void mouse_unregister(void); + + + +#endif /* MOUSE_H_ */ diff --git a/inc/option_menu.h b/inc/option_menu.h new file mode 100644 index 0000000..2755ea9 --- /dev/null +++ b/inc/option_menu.h @@ -0,0 +1,45 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef OPTION_MENU_H_ +#define OPTION_MENU_H_ + + +#include + +/** + * @brief Shows option menu with proper entries. + * @return true on success. + */ +extern bool option_menu_show(void); + +/** + * @brief Hides option menu popup. + */ +extern void option_menu_hide(void); + +/** + * @brief Handle hardware button actions. + */ +extern void option_menu_change_state_on_hw_menu_key(void); + +/** + * @brief Updates caption menu at the top of the screen. + */ +extern void option_menu_update_on_item_selected(void); + + +#endif /* OPTION_MENU_H_ */ diff --git a/inc/page_scroller.h b/inc/page_scroller.h new file mode 100644 index 0000000..8a56298 --- /dev/null +++ b/inc/page_scroller.h @@ -0,0 +1,164 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef PAGE_SCROLLER_H_ +#define PAGE_SCROLLER_H_ + + +#include +#include +#include + +/** + * @brief Creates new elm_scroller widget and sets standart parameters used in + * homescreen application. + * @param page_width page width. + * @param page_height page height. + * + * @return Pointer to created elm_scroller widget/ + */ +extern Evas_Object *page_scroller_create(int page_width, int page_height); + +/** + * @brief Removes all data connected with the page scroller object. + * + * @param page_scroller Page scroller pointer. + */ +extern void page_scroller_destroy(Evas_Object *page_scroller); + +/** + * @brief Add new page to the page scroller + * + * @param page_scroller Page scroller Evas_Object pointer. + * @param page Page Evas_Object pointer. + * + * @return true if no errors. + */ +extern bool page_scroller_add_page(Evas_Object *page_scroller, + Evas_Object *page); + +/** + * @brief Removes the page from the page scroller. + * @param page_scroller Page scroller object pointer. + * @param page Page which will be removed. + */ +extern void page_scroller_remove_page(Evas_Object *page_scroller, + Evas_Object *page); + +/** + * @brief Gets the page from the given page scroller. + * @param page_scroller Pointer to elm_scroller widget. + * @param n page number. + * + * @return Page Evas_Object pointer. + */ +extern Evas_Object *page_scroller_get_page(Evas_Object *page_scroller, int n); + +/** + * @brief Gets all pages inserted in the page scroller list. + * @param page_scroller Pointer to page scroller Evas_Object + * @return List of all pages. + */ +extern Eina_List *page_scroller_get_all_pages(Evas_Object *page_scroller); + +/** + * @brief Blocks page scroller movement. + * + * @param page_scroller Pointer to page scroller widget. + * @return true if no errors. + */ +extern bool page_scroller_freeze(Evas_Object *page_scroller); + +/** + * @brief Unblocks page scroller movement. + * + * @param page_scroller Pointer to page scroller Evas_Object. + * @return true if no errors. + */ +extern bool page_scroller_unfreeze(Evas_Object *page_scroller); + +/** + * @brief Returns elm_scroller pointer from page scroller layout. + * + * @param page_scroller Page scroller Evas_Object pointer. + * @return elm_scroller pointer or NULL if errors occurred. + */ +extern Evas_Object *page_scroller_get_scroller(Evas_Object *page_scroller); + +/** + * @brief Unpack all pages from the page scroller widget. + * @param page_scroller Page scroller Evas_Object. + * @return List of all pages (Evas_Objects) + */ +extern Eina_List *page_scroller_unpack_pages(Evas_Object *page_scroller); + +/** + * @brief Pack all pages into the page scroller widget. + * + * @param page_scroller Pointer to page scroller widget. + * @param page_list List of pages to pack. + */ +extern void page_scroller_pack_pages(Evas_Object *page_scroller, + Eina_List *page_list); + +/** + * @brief Gets page thumbnail (proxy object) + * + * @param page Pointer to page scroller page. + * @param int width of miniature + * @param int height of miniature + * @return Page copy (miniature) or NULL if errors occurred. + */ +extern Evas_Object *page_scroller_get_page_thumbnail(Evas_Object *page, + unsigned int w, unsigned int h); + +/** + * @brief Gets the elm_box pointer from the Page_Scroller Evas_Object. + * + * @param page_scroller Pointer to Page Scroller Evas_Object + * @return elm_box pointer placed in the Page scroller widget. + */ +extern Evas_Object *page_scroller_obtain_box(Evas_Object *page_scroller); + +/** + * @brief Get total number of pages + * @param page_scroller Elm_scroller pointer + * @return pages count if ok, -1 if error + */ + +extern int page_scroller_get_page_count(Evas_Object *page_scroller); +/** + * @brief Get current page + * @return current page number or -1 if something went wrong + */ +extern int page_scroller_get_current_page(Evas_Object *page_scroller); + +/** + * @brief Set current page of the scroller + * @param page_scroller Pointer to elm_scroller + * @param idx index of page + * @return true if success + */ +extern bool page_scroller_set_current_page(Evas_Object *page_scroller, int idx); + +/** + * @brief Shows page without animation + * + * @param page_scroller elm_scroller_pointer + * @param idx page index + */ +void page_scroller_show_page(Evas_Object *page_scroller, int idx); +#endif /* PAGE_SCROLLER_H_ */ diff --git a/inc/popup.h b/inc/popup.h new file mode 100644 index 0000000..bb0c83d --- /dev/null +++ b/inc/popup.h @@ -0,0 +1,76 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef POPUP_H_ +#define POPUP_H_ + +#include + +#include "app_icon.h" + +typedef enum { + ORDER_MANUALLY = 0, + ORDER_ALPHABETICAL = 1 +} order_mode_t; + +typedef enum { + POPUP_TWO_BUTTONS, + POPUP_INFO, +} popup_type_t; + +typedef struct { + popup_type_t type; + char *popup_title_text; + char *popup_content_text; + char *popup_confirm_text; + char *popup_cancel_text; + Elm_Popup_Orient orientation; + double visible_time; +} popup_data_t; + +typedef void (*popup_confirm_cb)(void *data); +typedef void (*popup_cancel_cb)(void *data); + +/** + * @brief Allocates a structure for initialze popup widet + * @return Pointer to popup data. It must be freed manually. + */ +popup_data_t *popup_create_data(void); + +/** + * @brief Frees p_data structure memory and its members + * @return + */ +void popup_data_free(popup_data_t *p_data); + +/** + * @brief Function shows popup window on the screen + * @param data popup_data_t struct which is used for initialize popup with + * its content. + *popup_confirm_cb - function called when confirm button will be clicked. + * popup_cancel_cb - function called when cancel button will be clicked. + * cb_data - data used in callback functions. + */ +void popup_show(popup_data_t *data, popup_confirm_cb confirm_cb, + popup_cancel_cb cancel_cb, void *cb_data); + +/** + * @brief Hide popup and remove all data + * @returns EINA_TRUE if popup is visible otherwise EINA_FALSE + */ +Eina_Bool popup_destroy(void); + +#endif /* POPUP_H_ */ diff --git a/inc/tree.h b/inc/tree.h new file mode 100644 index 0000000..d39648b --- /dev/null +++ b/inc/tree.h @@ -0,0 +1,108 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _TREE_H_ +#define _TREE_H_ + +#include +#include "app_item.h" + +#define TREE_NODE_FOREACH(parent, node) \ +for (node = parent->first; node != NULL; node = node->next) + +/* + * data - data bind to node + * parent - parent node + * next - next sibling + * prev - previous sibling + * first - first child + * last - last child + */ +typedef struct _tree_node { + app_item_t *data; + struct _tree_node *parent; + + unsigned int count; + struct _tree_node *next; + struct _tree_node *prev; + + struct _tree_node *first; + struct _tree_node *last; +} Tree_node_t; + + +/* + * @brief signature of callback function for tree_in_depth_browse() function + */ +typedef bool(*tree_browse_cb_t)(Tree_node_t*, Tree_node_t*, void*); + + +/* + * @brief Creates new tree node + * @details All node fields are initialized with \0 + */ +bool tree_node_new(Tree_node_t **node); + +/* + * @brief Detatch node + */ +bool tree_node_detatch(Tree_node_t *node); + +/* + * @brief Append child node to parent node + */ +bool tree_node_append(Tree_node_t *parent, Tree_node_t *node); + +/* + * @brief Append node to tree after relative node + */ +bool tree_node_append_relative(Tree_node_t *node, Tree_node_t *relative); + +/* + * @brief Prepend child node to parent node + */ +bool tree_node_prepend(Tree_node_t *parent, Tree_node_t *node); + +/* + * @brief Prepend node to tree before relative node + */ +bool tree_node_prepend_relative(Tree_node_t *node, Tree_node_t *relative); + +/* + * @brief Browse the tree in-depth + */ +bool tree_in_depth_browse(Tree_node_t *node, tree_browse_cb_t func_cb, + void *data); + +/* + * Updates a node with new values + */ +void tree_node_update(Tree_node_t *node); + +/* + * @brief frees memory of a single node in a safe manner. Returns count and + * pointers to children of the node. + * Updates nodes parent and siblings. Nodes children become + * detached from the tree. + * @param node[IN] - node to free + * @param first_child - nodes first child + * @param last_child - nodes last child + * @param child_count - nodes children count + */ +void tree_node_free(Tree_node_t *node, Tree_node_t **first_child, + Tree_node_t **last_child, int *child_count); + +#endif diff --git a/inc/util.h b/inc/util.h new file mode 100644 index 0000000..24c8f82 --- /dev/null +++ b/inc/util.h @@ -0,0 +1,75 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __HOME_SCREEN_UTIL_H__ +#define __HOME_SCREEN_UTIL_H__ + +#include +#include +#include + +#define BUF_SIZE 64 + +/* Multi-language */ +#ifndef _ +#define _(str) gettext(str) +#endif + +/* Build */ +#define HAPI __attribute__((visibility("hidden"))) + +#define COUNT_OF(x) \ +((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x]))))) + + +/** + * @brief Creates elm_layout widget and load edje file to it. + * + * @param win Homescreen efl window pointer. + * @param edje_filename name of the edje file + * @param edje_group group name from the edje file + * @return elm_layout Evas_Object pointer. + */ +extern Evas_Object *util_create_edje_layout( + Evas_Object *win, const char* edje_filename, const char* edje_group); + +/*DBG callbacks set. Please use it if new objects are not visible .etc*/ +extern void tst_resize_cb(void *data, Evas *e, Evas_Object *obj, void *ei); +extern void tst_show_cb(void *data, Evas *e, Evas_Object *obj, void *ei); +extern void tst_hide_cb(void *data, Evas *e, Evas_Object *obj, void *ei); +extern void tst_move_cb(void *data, Evas *e, Evas_Object *obj, void *ei); +extern void tst_del_cb(void *data, Evas *e, Evas_Object *obj, void *ei); + + + +/** + * @brief Function returns Eina list of evas objects visible in gengrid + * + * @param gengrid Evas_Object pointer to elm_gengrid + * @return Eina_List pointer which Evas_Objects + */ +extern Eina_List *elm_gengrid_get_evas_objects_from_items(Evas_Object *gengrid); + +/** + * @brief Function returns pointer to elm_object_item placed in gengrid + * at specified position + * @param gengrid Pointer to elm_gengrid_widget; + * @param idx + * @return Pointer to elm_object_item + */ +Elm_Object_Item *elm_gengrid_get_item_at_index(Evas_Object *gengrid, int idx); + +#endif /* __HOME_SCREEN_UTIL_H__ */ diff --git a/org.tizen.homescreen-efl.efl b/org.tizen.homescreen-efl.efl new file mode 100644 index 0000000..4a189dd --- /dev/null +++ b/org.tizen.homescreen-efl.efl @@ -0,0 +1,23 @@ +org.tizen.homescreen-efl data-provider-master::db rwx--l ------ +org.tizen.homescreen-efl data-provider-master::share rwxat- ------ +org.tizen.homescreen-efl data-provider-master::data rwx--- ------ +org.tizen.homescreen-efl tizen::vconf::system rwxatl ------ +org.tizen.homescreen-efl syspopup::db r-----l ------ +org.tizen.homescreen-efl device::app_logging rw---- ------ +org.tizen.homescreen-efl rua::db rw---- ------ +org.tizen.homescreen-efl badge::db rw---- ------ +org.tizen.homescreen-efl e17 rwx--- ------ +org.tizen.homescreen-efl dlogutil r-x--- ------ +org.tizen.homescreen-efl data-provider-master::shortcut rw---- ------ +org.tizen.homescreen-efl data-provider-master::shortcut.shortcut -w---- ------ +org.tizen.homescreen-efl data-provider-master::shortcut.widget -w---- ------ +org.tizen.homescreen-efl data-provider-master::client rw---- ------ +org.tizen.homescreen-efl data-provider-master rw---- ------ +org.tizen.homescreen-efl shortcut-service::db r----l ------ +org.tizen.homescreen-efl org.tizen.setting::default-resources r-x--- ------ +org.tizen.homescreen-efl xorg rw---- ------ +org.tizen.homescreen-efl tizen::vconf::display r----l ------ +org.tizen.homescreen-efl data-provider-master::fd rw---- ------ +org.tizen.homescreen-efl org.tizen.contacts rwx--- ------ +org.tizen.homescreen-efl org.tizen.wallpaper-ui-service r----- ------ + diff --git a/org.tizen.homescreen-efl.manifest b/org.tizen.homescreen-efl.manifest new file mode 100644 index 0000000..81eb500 --- /dev/null +++ b/org.tizen.homescreen-efl.manifest @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/org.tizen.homescreen-efl.xml b/org.tizen.homescreen-efl.xml new file mode 100644 index 0000000..f0e9e37 --- /dev/null +++ b/org.tizen.homescreen-efl.xml @@ -0,0 +1,19 @@ + + + Michal Szczecinski + + Homescreen Application + + + + /usr/share/icons/default/small/org.tizen.menu-screen.png + + + http://tizen.org/privilege/shortcut + http://tizen.org/privilege/systemsettings + http://tizen.org/privilege/appmanager.launch + http://tizen.org/privilege/notification + http://tizen.org/privilege/packagemanager.admin + http://tizen.org/privilege/packagemanager.info + + diff --git a/packaging/org.tizen.homescreen-efl.spec b/packaging/org.tizen.homescreen-efl.spec new file mode 100644 index 0000000..064d807 --- /dev/null +++ b/packaging/org.tizen.homescreen-efl.spec @@ -0,0 +1,93 @@ +%define _optdir /opt + +%define _appdir /opt/usr/apps +%define _packagedir %{_appdir}/%{_package_name} + +Name: org.tizen.homescreen-efl +Summary: Homescreen +Version: 0.0.1 +Release: 0.1 +Group: TO_BE/FILLED_IN +License: Flora License +Source0: %{name}-%{version}.tar.gz + +%if "%{?tizen_profile_name}" == "wearable" +ExcludeArch: %{arm} %ix86 x86_64 +%endif + +%if "%{?tizen_profile_name}" == "tv" +ExcludeArch: %{arm} %ix86 x86_64 +%endif + +BuildRequires: pkgconfig(appsvc) +BuildRequires: pkgconfig(badge) +BuildRequires: pkgconfig(capi-appfw-application) +BuildRequires: pkgconfig(capi-system-info) +BuildRequires: pkgconfig(capi-appfw-package-manager) +BuildRequires: pkgconfig(capi-appfw-app-manager) +BuildRequires: pkgconfig(dlog) +BuildRequires: pkgconfig(elementary) +BuildRequires: pkgconfig(shortcut) +BuildRequires: pkgconfig(syspopup-caller) +BuildRequires: pkgconfig(widget_viewer) +BuildRequires: pkgconfig(widget_service) +BuildRequires: pkgconfig(sqlite3) +BuildRequires: pkgconfig(db-util) +BuildRequires: pkgconfig(notification) +BuildRequires: pkgconfig(capi-system-system-settings) +BuildRequires: cmake +BuildRequires: edje-tools +BuildRequires: gettext-tools +BuildRequires: coreutils +BuildRequires: pkgconfig(widget_service) +BuildRequires: pkgconfig(widget_viewer_evas) +BuildRequires: pkgconfig(shortcut) +BuildRequires: pkgconfig(capi-appfw-preference) + +%description +Tizen Homescreen + +%prep +%setup -q + +%build +%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} +CFLAGS="${CFLAGS} -Wall" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed -fpie" +make %{?jobs:-j%jobs} + +%install +%make_install +%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 +cp LICENSE %{buildroot}/usr/share/license/homescreen-efl + +%post +killall -9 homescreen-efl +dlogutil -c +#/usr/bin/signing-client/hash-signer-client.sh -a -d -p platform %{_packagedir} + +%files +%manifest %{name}.manifest +%defattr(-,root,root,-) + +%{_optdir}/usr/apps/%{name}/bin/homescreen-efl +%{_optdir}/usr/apps/%{name}/res/edje/*.edj +%{_optdir}/usr/apps/%{name}/res/images/*.png +%{_optdir}/usr/apps/%{name}/res/images/livebox/*.png +%{_optdir}/usr/apps/%{name}/res/locale/*/*/*.mo +%{_datadir}/packages/%{name}.xml +%{_sysconfdir}/smack/accesses.d/*.efl +%dir %{_optdir}/usr/apps/%{name}/data +%attr(777, root, root) %{_optdir}/usr/apps/%{name}/data +/usr/share/license/homescreen-efl \ No newline at end of file diff --git a/res/CMakeLists.txt b/res/CMakeLists.txt new file mode 100644 index 0000000..38e2e01 --- /dev/null +++ b/res/CMakeLists.txt @@ -0,0 +1,4 @@ +ADD_SUBDIRECTORY(edje) +ADD_SUBDIRECTORY(images) +ADD_SUBDIRECTORY(po) +# End of a file diff --git a/res/edje/CMakeLists.txt b/res/edje/CMakeLists.txt new file mode 100644 index 0000000..f96d6dd --- /dev/null +++ b/res/edje/CMakeLists.txt @@ -0,0 +1,71 @@ +ADD_CUSTOM_TARGET(home.edj + COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/../images ${EDJE_CFLAGS} + ${CMAKE_CURRENT_SOURCE_DIR}/home.edc home.edj + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/home.edc +) +ADD_DEPENDENCIES(${PROJECT_NAME} home.edj) +INSTALL(FILES home.edj DESTINATION ${EDJEDIR}) + +ADD_CUSTOM_TARGET(icon.edj + COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/../images ${EDJE_CFLAGS} + ${CMAKE_CURRENT_SOURCE_DIR}/icon.edc icon.edj + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/icon.edc +) +ADD_DEPENDENCIES(${PROJECT_NAME} icon.edj) +INSTALL(FILES icon.edj DESTINATION ${EDJEDIR}) + +ADD_CUSTOM_TARGET(folder.edj + COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/../images ${EDJE_CFLAGS} + ${CMAKE_CURRENT_SOURCE_DIR}/folder.edc folder.edj + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/folder.edc +) +ADD_DEPENDENCIES(${PROJECT_NAME} folder.edj) +INSTALL(FILES folder.edj DESTINATION ${EDJEDIR}) + +ADD_CUSTOM_TARGET(folder_entry.edj + COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/../images ${EDJE_CFLAGS} + ${CMAKE_CURRENT_SOURCE_DIR}/folder_entry.edc folder_entry.edj + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/folder_entry.edc +) +ADD_DEPENDENCIES(${PROJECT_NAME} folder_entry.edj) +INSTALL(FILES folder_entry.edj DESTINATION ${EDJEDIR}) + +ADD_CUSTOM_TARGET(index_element.edj + COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/../images ${EDJE_CFLAGS} + ${CMAKE_CURRENT_SOURCE_DIR}/index_element.edc index_element.edj + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/index_element.edc +) +ADD_DEPENDENCIES(${PROJECT_NAME} index_element.edj) +INSTALL(FILES index_element.edj DESTINATION ${EDJEDIR}) + +ADD_CUSTOM_TARGET(app_grid.edj + COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/../images ${EDJE_CFLAGS} + ${CMAKE_CURRENT_SOURCE_DIR}/app_grid.edc app_grid.edj + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/app_grid.edc +) +ADD_DEPENDENCIES(${PROJECT_NAME} app_grid.edj) +INSTALL(FILES app_grid.edj DESTINATION ${EDJEDIR}) + +ADD_CUSTOM_TARGET(livebox_container.edj + COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/../images ${EDJE_CFLAGS} + ${CMAKE_CURRENT_SOURCE_DIR}/livebox_container.edc livebox_container.edj + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/livebox_container.edc +) +ADD_DEPENDENCIES(${PROJECT_NAME} livebox_container.edj) +INSTALL(FILES livebox_container.edj DESTINATION ${EDJEDIR}) + +ADD_CUSTOM_TARGET(livebox_layout.edj + COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/../images ${EDJE_CFLAGS} + ${CMAKE_CURRENT_SOURCE_DIR}/livebox_layout.edc livebox_layout.edj + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/livebox_layout.edc +) +ADD_DEPENDENCIES(${PROJECT_NAME} livebox_layout.edj) +INSTALL(FILES livebox_layout.edj DESTINATION ${EDJEDIR}) + +ADD_CUSTOM_TARGET(page_edit.edj + COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/../images ${EDJE_CFLAGS} + ${CMAKE_CURRENT_SOURCE_DIR}/page_edit.edc page_edit.edj + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/page_edit.edc +) +ADD_DEPENDENCIES(${PROJECT_NAME} page_edit.edj) +INSTALL(FILES page_edit.edj DESTINATION ${EDJEDIR}) diff --git a/res/edje/app_grid.edc b/res/edje/app_grid.edc new file mode 100644 index 0000000..b349f2c --- /dev/null +++ b/res/edje/app_grid.edc @@ -0,0 +1,148 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "../../inc/conf.h" + +collections { + group { + name: GROUP_APP_GRID; + parts { + //We want to have animations and don't take care about gengrid size from code. + //Because of that we must to add a part into the layout which set the size of the elm_layout + //widget properly. + part { + name: PART_APP_GRID_SIZE_SETTER; + type: SWALLOW; + description { + state: "default" 0.0; + rel1 {relative: 0.0 0.0;} + rel2 {relative: 1.0 1.0;} + } + } + part { + name: PART_APP_GRID_BG; + type: RECT; + description { + state: "default" 0.0; + rel1 {relative: 0.0 0.0; to: PART_APP_GRID_SIZE_SETTER;} + rel2 {relative: 1.0 1.0; to: PART_APP_GRID_SIZE_SETTER;} + color: 0 0 0 45; + visible: 1; + } + description { + state: "hidden" 0.0; //Used in the folder + inherit: "default" 0.0; + visible: 0; + } + } + part { + name: PART_APP_GRID_EDIT_BG; + type: RECT; + description { + state: "default" 0.0; + rel1 {relative: 0.0 0.0; to: PART_APP_GRID_CONTENT;} + rel2 {relative: 1.0 1.0; to: PART_APP_GRID_CONTENT;} + color: 20 20 20 0; + visible: 1; + } + description { + state: "edit" 0.0; + inherit: "default" 0.0; + color: 20 20 20 40; + } + description { + state: "hidden" 0.0; //Used in the folder + inherit: "default" 0.0; + visible: 0; + } + } + part { + name: PART_APP_GRID_CONTENT; + type: SWALLOW; + description { + state: "default" 0.0; + align: 0.5 0.5; + rel1 {relative: 0.0 CONTENT_Y_MIN; to: PART_APP_GRID_SIZE_SETTER;} + rel2 {relative: 1.0 CONTENT_APP_Y_MAX; to: PART_APP_GRID_SIZE_SETTER;} + } + description { + state: "edit" 0.0; + inherit: "default" 0.0; + rel1.relative: 0.05 CONTENT_Y_MIN; + rel2.relative: 0.95 0.9; + } + } + } + programs { + program { + name: "bg_edit_mode_on"; + signal: SIGNAL_EDIT_MODE_ON; + source: SIGNAL_SOURCE; + action: STATE_SET "edit" 0.0; + target: PART_APP_GRID_CONTENT; + target: PART_APP_GRID_EDIT_BG; + transition: DECELERATE ANIMATION_RESIZE_TIME; + } + program { + name: "bg_edit_mode_off"; + signal: SIGNAL_EDIT_MODE_OFF; + source: SIGNAL_SOURCE; + action: STATE_SET "default" 0.0; + target: PART_APP_GRID_CONTENT; + target: PART_APP_GRID_EDIT_BG; + transition: DECELERATE ANIMATION_RESIZE_TIME; + } + program { + name: "bg_choose_mode_off"; + signal: SIGNAL_CHOOSE_MODE_OFF; + source: SIGNAL_SOURCE; + action: STATE_SET "default" 0.0; + target: PART_APP_GRID_CONTENT; + transition: DECELERATE ANIMATION_RESIZE_TIME; + } + program { + name: "bg_choose_mode_on"; + signal: SIGNAL_CHOOSE_MODE_ON; + source: SIGNAL_SOURCE; + action: STATE_SET "edit" 0.0; + target: PART_APP_GRID_CONTENT; + transition: DECELERATE ANIMATION_RESIZE_TIME; + } + program { + name: "bg_hidden"; + signal: SIGNAL_APP_GRID_BG_HIDE; + source: SIGNAL_SOURCE; + action: STATE_SET "hidden" 0.0; + target: PART_APP_GRID_BG; + target: PART_APP_GRID_EDIT_BG; + } + } + } + group { + name: GROUP_APP_GRID_ITEM_CONTAINER; + parts { + part { + name: PART_APP_GRID_ITEM; + type: SWALLOW; + description { + state: "default" 0.0; + rel1.relative: 0.0 0.0; + rel2.relative: 1.0 1.0; + } + } + } + } +} \ No newline at end of file diff --git a/res/edje/folder.edc b/res/edje/folder.edc new file mode 100644 index 0000000..02b1e46 --- /dev/null +++ b/res/edje/folder.edc @@ -0,0 +1,619 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "../../inc/conf.h" + +images { + image: "../images/folder_appicon_bg.png" COMP; + image: "../images/folder_appicon_bg_possible.png" COMP; + image: "../images/folder_appicon_bg_impossible.png" COMP; + image: "../images/folder_appicon_empty_bg.png" COMP; + image: "../images/folder_popup_bg.png" COMP; + image: "../images/btn_input_clear.png" COMP; + image: "../images/btn_add_nor.png" COMP; + image: "../images/btn_add_press.png" COMP; +} + +collections { + + group { + name: GROUP_FOLDER_ICON_LAYOUT; + parts { + part { + name: "folder_bg"; + type: SPACER; + scale: 1; + description { + state: "default" 0.0; + rel1{relative: 0.0 0.0;} + rel2{relative: 1.0 1.0;} + } + description + { + state: "manage_state" 0.0; + inherit: "default" 0.0; + } + } + + part { + name: "folder_icon_exterior"; + type: IMAGE; + mouse_events: 1; + scale: 1; + description { + state: "default" 0.0; + rel1{relative: 0.0 0.0; to: "folder_bg";} + rel2{relative: 1.0 1.0; to: "folder_bg";} + aspect: 1.0 1.0; + aspect_preference: BOTH; + image { + normal: "../images/folder_appicon_bg.png"; + } + } + description { + state: "frame_possible" 0.0; + inherit: "default" 0.0; + image { + normal: "../images/folder_appicon_bg_possible.png"; + } + } + description { + state: "frame_impossible" 0.0; + inherit: "default" 0.0; + image { + normal: "../images/folder_appicon_bg_impossible.png"; + } + } + } + + part + { + name: "folder_icon_interior"; + type: IMAGE; + mouse_events: 1; + scale: 1; + description + { + state: "default" 0.0; + rel1{relative: 0.0 0.0; to: "folder_bg";} + rel2{relative: 1.0 1.0; to: "folder_bg";} + aspect: 1.0 1.0; + aspect_preference: BOTH; + visible: 0; + image + { + normal: "../images/folder_appicon_empty_bg.png"; + } + } + description + { + state: "empty_folder" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + + part { + name: "miniature_0"; + type: SWALLOW; + description { + state: "default" 0.0; + rel1{relative: MINIATURE_CENTER_MIN MINIATURE_CENTER_MIN; to: "folder_icon_exterior";} + rel2{relative: MINIATURE_CENTER_MAX MINIATURE_CENTER_MAX; to: "folder_icon_exterior";} + } + description { + state: "apps_1" 0.0; + inherit: "default" 0.0; + rel1{relative: MINIATURE_CENTER_MIN MINIATURE_CENTER_MIN;} + rel2{relative: MINIATURE_CENTER_MAX MINIATURE_CENTER_MAX;} + } + description { + state: "apps_2" 0.0; + inherit: "default" 0.0; + rel1{relative: MINIATURE_COL_1_MIN MINIATURE_CENTER_MIN;} + rel2{relative: MINIATURE_COL_1_MAX MINIATURE_CENTER_MAX;} + } + description { + state: "apps_4" 0.0; + inherit: "default" 0.0; + rel1{relative: MINIATURE_COL_1_MIN MINIATURE_ROW_1_MIN;} + rel2{relative: MINIATURE_COL_1_MAX MINIATURE_ROW_1_MAX;} + } + } + part { + name: "miniature_1"; + type: SWALLOW; + description { + state: "default" 0.0; + rel1{relative: MINIATURE_CENTER_MIN MINIATURE_CENTER_MIN; to: "folder_icon_exterior";} + rel2{relative: MINIATURE_CENTER_MAX MINIATURE_CENTER_MAX; to: "folder_icon_exterior";} + } + description { + state: "apps_2" 0.0; + inherit: "default" 0.0; + rel1{relative: MINIATURE_COL_2_MIN MINIATURE_CENTER_MIN;} + rel2{relative: MINIATURE_COL_2_MAX MINIATURE_CENTER_MAX;} + } + description { + state: "apps_4" 0.0; + inherit: "default" 0.0; + rel1{relative: MINIATURE_COL_2_MIN MINIATURE_ROW_1_MIN;} + rel2{relative: MINIATURE_COL_2_MAX MINIATURE_ROW_1_MAX;} + } + } + part { + name: "miniature_2"; + type: SWALLOW; + description { + state: "default" 0.0; + rel1{relative: MINIATURE_CENTER_MIN MINIATURE_CENTER_MIN; to: "folder_icon_exterior";} + rel2{relative: MINIATURE_CENTER_MAX MINIATURE_CENTER_MAX; to: "folder_icon_exterior";} + } + description { + state: "apps_4" 0.0; + inherit: "default" 0.0; + rel1{relative: MINIATURE_COL_1_MIN MINIATURE_ROW_2_MIN;} + rel2{relative: MINIATURE_COL_1_MAX MINIATURE_ROW_2_MAX;} + } + } + part { + name: "miniature_3"; + type: SWALLOW; + description { + state: "default" 0.0; + rel1{relative: MINIATURE_CENTER_MIN MINIATURE_CENTER_MIN; to: "folder_icon_exterior";} + rel2{relative: MINIATURE_CENTER_MAX MINIATURE_CENTER_MAX; to: "folder_icon_exterior";} + } + description { + state: "apps_4" 0.0; + inherit: "default" 0.0; + rel1{relative: MINIATURE_COL_2_MIN MINIATURE_ROW_2_MIN;} + rel2{relative: MINIATURE_COL_2_MAX MINIATURE_ROW_2_MAX;} + } + } + } + + programs { + program { + name: "folder_clicked_program"; + signal :"mouse,clicked,1"; + source: "icon_content"; + action: SIGNAL_EMIT SIGNAL_FOLDER_CLICKED SIGNAL_SOURCE; + //after: program with change the icon shadow state to clicked! + } + program { + name: "set,miniatures,1"; + signal: "set,miniatures,1"; + source: SIGNAL_SOURCE; + action: STATE_SET "default" 0.0; + target: "folder_icon_interior"; + after: "content_update_1"; + } + program { + name: "content_update_1"; + action: STATE_SET "apps_1" 0.0; + target: "miniature_0"; + transition: DECELERATE 0.2; + } + + program { + name: "set,miniatures,2"; + signal: "set,miniatures,2"; + source: SIGNAL_SOURCE; + action: STATE_SET "default" 0.0; + target: "folder_icon_interior"; + after: "content_update_2"; + } + program { + name: "content_update_2"; + action: STATE_SET "apps_2" 0.0; + target: "miniature_0"; + target: "miniature_1"; + transition: DECELERATE 0.2; + } + + program { + name: "set,miniatures,4"; + signal: "set,miniatures,4"; + source: SIGNAL_SOURCE; + action: STATE_SET "default" 0.0; + target: "folder_icon_interior"; + after: "content_update_4"; + } + program { + name: "content_update_4"; + action: STATE_SET "apps_4" 0.0; + target: "miniature_0"; + target: "miniature_1"; + target: "miniature_2"; + target: "miniature_3"; + transition: DECELERATE 0.2; + } + program { + name: "show,bg,possible"; + signal: SIGNAL_FRAME_POSSIBLE_SHOW; + source: SIGNAL_SOURCE; + action: STATE_SET "frame_possible" 0.0; + target: "folder_icon_exterior"; + } + program { + name: "show,bg,impossible"; + signal: SIGNAL_FRAME_IMPOSSIBLE_SHOW; + source: SIGNAL_SOURCE; + action: STATE_SET "frame_impossible" 0.0; + target: "folder_icon_exterior"; + } + program { + name: "show,bg,default"; + signal: SIGNAL_FRAME_HIDE; + source: SIGNAL_SOURCE; + action: STATE_SET "default" 0.0; + target: "folder_icon_exterior"; + } + program { + name: "show,bg,empty"; + signal: SIGNAL_EMPTY_BG_SHOW; + source: SIGNAL_SOURCE; + action: STATE_SET "empty_folder" 0.0; + target: "folder_icon_interior"; + } + program { + name: "hide,bg,empty"; + action: STATE_SET "default" 0.0; + target: "folder_icon_interior"; + } + } + } + + group { + name: GROUP_FOLDER_ADD_ICON; + parts { + part { + name: "bg"; + type: SPACER; + scale: 1; + description { + state: "default" 0.0; + rel1{relative: 0.0 0.0;} + rel2{relative: 1.0 1.0;} + } + description + { + state: "manage_state" 0.0; + inherit: "default" 0.0; + } + } + part + { + name: "add_icon"; + type: IMAGE; + scale: 1; + mouse_events: 1; + description + { + state: "default" 0.0; + rel1 {relative: 0.0 0.0; to: "bg";} + rel2 {relative: 1.0 1.0; to: "bg";} + aspect: 1.0 1.0; + aspect_preference: BOTH; + image { + normal: "../images/btn_add_nor.png"; + } + } + description + { + state: "pressed" 0.0; + inherit: "default" 0.0; + image { + normal: "../images/btn_add_press.png"; + } + } + } + } + programs { + program { + name: "add_pressed"; + signal: "mouse,down,1"; + source: "add_icon"; + action: STATE_SET "pressed" 0.0; + target: "add_icon"; + transition: DECELERATE 0.2; + } + program { + name: "add_released"; + signal: "mouse,up,1"; + source: "add_icon"; + action: STATE_SET "default" 0.0; + target: "add_icon"; + transition: DECELERATE 0.2; + } + } + } + + group { + name: GROUP_FOLDER_WINDOW; + parts { + part { + name: "bg"; //this part should be rect because click on it should close the folder. + type: RECT; + mouse_events: 1; + repeat_events: 0; + description { + state: "default" 0.0; + color: 0 0 0 0; + rel1.relative: 0.0 0.0; + rel2.relative: 1.0 1.0; + } + } + } + programs { + program { + name: "background_clicked_cb"; + signal: "mouse,clicked,1"; + source: "bg"; + action: SIGNAL_EMIT "bg_clicked" SIGNAL_SOURCE; + } + } + } + + group + { + name: GROUP_FOLDER_POPUP; + parts + { + part + { + name: "folder_bg"; + type: IMAGE; + description + { + state: "default" 0.0; + rel1 {relative: 0.0 0.0;} + rel2 {relative: 1.0 0.0;} + image { + normal: "../images/folder_popup_bg.png"; + border: 5 5 5 5; + } + } + description { + state: "done"; + inherit: "default" 0.0; + rel1 {relative: 0.0 0.0;} + rel2 {relative: 1.0 1.0;} + } + } + part + { + name: "separator"; + type: RECT; + description + { + state: "default" 0.0; + rel1 {relative: FOLDER_LEFT_MARGIN FOLDER_SEPARATOR_Y_MIN; to: "folder_bg";} + rel2 {relative: FOLDER_RIGHT_MARGIN FOLDER_SEPARATOR_Y_MAX; to: "folder_bg";} + color: 0 0 255 150; + } + } + part + { + name: PART_FOLDER_NAME; //align y 0.0 + type: SWALLOW; + description + { + state: "default" 0.0; + rel1 {relative: 0.15 FOLDER_NAME_Y_MIN; to: "folder_bg";} + rel2 {relative: 0.85 FOLDER_NAME_Y_MAX; to: "folder_bg";} + color: 0 0 0 0; + visible: 0; + } + description { + state: "done" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { + name: PART_FOLDER_UNNAMED_TEXT; + type: TEXT; + mouse_events: 1; + repeat_events: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; to: PART_FOLDER_NAME;} + rel2 { relative: 1.0 1.0; to: PART_FOLDER_NAME;} + color: 0 0 0 255; + visible: 0; + text { + text: ""; + size: 26; + } + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part + { + name: "folder_clear_text_btn"; + type: IMAGE; + description { + state: "default" 0.0; + rel1 {relative: 1.02 0.12; to: PART_FOLDER_NAME;} + rel2 {relative: 1.10 0.88; to: PART_FOLDER_NAME;} + aspect_preference: BOTH; + image + { + normal: "../images/btn_input_clear.png"; + } + visible: 0; + } + description + { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description + { + state: "dim" 0.0; + inherit: "visible"; + color: 20 20 20 255; + } + } + part + { + name: "folder_entry_block"; + type: RECT; + repeat_events: 0; + description + { + state: "default" 0.0; + rel1 {relative: 0.0 0.0; to: PART_FOLDER_NAME;} + rel2 {relative: 1.0 1.0; to: PART_FOLDER_NAME;} + color: 0 0 0 0; + visible: 0; + } + description + { + state: "block_on" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part + { + name: PART_FOLDER_CONTENT; //align y 1.0 + type: SWALLOW; + description + { + state: "default"; + rel1 {relative: FOLDER_LEFT_MARGIN FOLDER_CONTENT_Y_MIN; to: "folder_bg";} + rel2 {relative: FOLDER_RIGHT_MARGIN FOLDER_CONTENT_Y_MAX; to: "folder_bg";} + color: 0 0 0 0; + } + } + } + programs + { + //Clear button programs + program + { + name: "clear_button_show"; + signal: SIGNAL_CLEAR_BTN_SHOW; + source: SIGNAL_SOURCE; + action: STATE_SET "visible" 0.0; + target: "folder_clear_text_btn"; + } + program + { + name: "clear_button_hide"; + signal: SIGNAL_CLEAR_BTN_HIDE; + source: SIGNAL_SOURCE; + action: STATE_SET "default" 0.0; + target: "folder_clear_text_btn"; + } + program + { + name: "folder_entry_block_on"; + signal: SIGNAL_ENTRY_BLOCK_ON; + source: SIGNAL_SOURCE; + action: STATE_SET "block_on" 0.0; + target: "folder_entry_block"; + } + program + { + name: "folder_entry_block_off"; + signal: SIGNAL_ENTRY_BLOCK_OFF; + source: SIGNAL_SOURCE; + action: STATE_SET "default" 0.0; + target: "folder_entry_block"; + } + program + { + name: "clear_btn_clicked"; + signal: "mouse,clicked,1"; + source: "folder_clear_text_btn"; + action: SIGNAL_EMIT SIGNAL_CLEAR_BTN_CLICKED SIGNAL_SOURCE; + } + program + { + name: "clear_btn_mouse_down"; + signal: "mouse,down,1"; + source: "folder_clear_text_btn"; + action: STATE_SET "dim" 0.0; + target: "folder_clear_text_btn"; + } + program + { + name: "clear_btn_mouse_up"; + signal: "mouse,up,1"; + source: "folder_clear_text_btn"; + action: STATE_SET "visible" 0.0; + target: "folder_clear_text_btn"; + } + //Animations + program { + name: "folder_open_animation"; + signal: SIGNAL_FOLDER_PANEL_OPEN; + source: SIGNAL_SOURCE; + action: STATE_SET "done" 0.0; + target: "folder_bg"; + after: "show_entry_program"; + transition: DECELERATE 0.3; + } + program { + name: "show_entry_program"; + action: STATE_SET "done" 0.0; + target: PART_FOLDER_NAME; + } + program { + name: "folder_close_animation_start"; + signal: SIGNAL_FOLDER_PANEL_CLOSE; + source: SIGNAL_SOURCE; + action: STATE_SET "default" 0.0; + target: PART_FOLDER_NAME; + after: "folder_close_animation"; + } + program { + name: "folder_close_animation"; + action: STATE_SET "default" 0.0; + target: "folder_bg"; + after: "folder_close_animation_done"; + transition: DECELERATE 0.3; + } + program { + name: "folder_close_animation_done"; + action: SIGNAL_EMIT SIGNAL_FOLDER_ANIM_DONE SIGNAL_SOURCE; + } + program { + name: "unnamed_text_show"; + signal: SIGNAL_FOLDER_UNNAMED_TEXT_SHOW; + source: SIGNAL_SOURCE; + action: STATE_SET "visible" 0.0; + target: PART_FOLDER_UNNAMED_TEXT; + } + program { + name: "unnamed_text_hide"; + signal: SIGNAL_FOLDER_UNNAMED_TEXT_HIDE; + source: SIGNAL_SOURCE; + action: STATE_SET "default" 0.0; + target: PART_FOLDER_UNNAMED_TEXT; + } + } + } +} diff --git a/res/edje/folder_entry.edc b/res/edje/folder_entry.edc new file mode 100644 index 0000000..891bd0e --- /dev/null +++ b/res/edje/folder_entry.edc @@ -0,0 +1,376 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +collections { + base_scale: 1.8; + group { + name: "elm/entry/base-single/default"; + styles { + style { name: "entry_single_textblock_style"; + base: "font=Tizen:style=Regular color=#00000000 align=center font_size=26 style=shadow shadow_color=#000000bf wrap=word"; + } + style { name: "entry_single_textblock_disabled_style"; + base: "font=Tizen:style=Regular color=#00000000 align=center font_size=26 style=shadow shadow_color=#000000bf wrap=word"; + } + } + data { + item: context_menu_orientation "horizontal"; + } + parts { + part { + name: "entry.swallow.background"; + type: SWALLOW; + scale: 1; + description { + state: "default" 0.0; + visible: 1; + rel1 { relative: 0 0; to: "elm.text"; } + rel2 { relative: 1 1; to: "elm.text"; } + } + } + } + parts { + part { + name: "elm.text"; + type: TEXTBLOCK; + mouse_events: 1; + scale: 1; + entry_mode: EDITABLE; + multiline: 0; + source: "elm/entry/selection/default"; + source2: "elm/entry/selection/block_handle"; + source3: "elm/entry/selection/block_handle_top"; + source4: "elm/entry/cursor/default"; + source5: "elm/entry/anchor/default"; + description { + state: "default" 0.0; + text { + style: "entry_single_textblock_style"; + min: 1 1; + max: 0 1; + } + } + description { + state: "disabled" 0.0; + inherit: "default" 0.0; + text { + style: "entry_single_textblock_disabled_style"; + } + } + } + } + programs { + program { + name: "focus"; + signal: "load"; + source: ""; + action: FOCUS_SET; + target: "elm.text"; + } + program { + name: "disable"; + signal: "elm,state,disabled"; + source: "elm"; + action: STATE_SET "disabled" 0.0; + target: "elm.text"; + } + program { + name: "enable"; + signal: "elm,state,enabled"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "elm.text"; + } + } + } + group { + name: "elm/entry/cursor/default"; + parts { + part { + name: "clip2"; + type: RECT; + mouse_events: 0; + scale: 1; + description { + state: "default" 0.0; + rel1.to: "clip"; + rel2.to: "clip"; + visible: 0; + } + description { + state: "focused" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { + name: "clip"; + type: RECT; + mouse_events: 0; + scale: 1; + clip_to: "clip2"; + description { + state: "default" 0.0; + rel1.offset: -10 0; + rel2.offset: 9 9; + } + description { + state: "hidden" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + part { + name: "base"; + mouse_events: 0; + scale: 1; + clip_to: "clip"; + description { + state: "default" 0.0; + min: 2 2; + align: 0.5 1.0; + color: 0 0 0 0; + } + } + part { + name: "glow"; + type: RECT; + mouse_events: 0; + scale: 1; + clip_to: "clip2"; + description { + state: "default" 0.0; + min: 4 0; + fixed: 1 0; + align: 0.5 0.5; + rel1 { + relative: 0.0 0.0; + offset: 0 2; + } + rel2 { + relative: 0.0 1.0; + offset: 0 -2; + } + color: 42 137 194 255; + } + description { + state: "hidden" 0.0; + inherit: "default" 0.0; + color: 0 0 0 0; + } + } + } + programs { + program { + name: "show"; + action: STATE_SET "hidden" 0.0; + in: 0.6 0.0; + target: "glow"; + after: "show4"; + } + program { + name: "show4"; + action: STATE_SET "default" 0.0; + in: 0.6 0.0; + target: "glow"; + after: "show"; + } + program { + name: "focused"; + signal: "elm,action,focus"; + source: "elm"; + action: STATE_SET "focused" 0.0; + target: "clip2"; + after: "show4"; + } + program { + name: "unfocused"; + signal: "elm,action,unfocus"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "clip2"; + after: "stop_glow"; + } + program { + name: "stop_glow"; + action: ACTION_STOP; + target: "show"; + target: "show4"; + } + } + } + group { name: "elm/entry/selection/default"; + parts { + part { + name: "bg"; + type: RECT; + scale: 1; + mouse_events: 0; + description { + state: "default" 0.0; + color: 138 183 223 128; + } + } + } + } + group { + name: "elm/entry/selection/block_handle"; + data.item: "position" "BOTH"; + parts { + part { + name: "bg"; + type: RECT; + scale: 1; + mouse_events: 1; + description { + state: "default" 0.0; + visible: 1; + fixed: 1 1; + align: 0.5 0.25; + min: 50 80; + color: 0 0 0 0; + } + } + part { + name: "handle"; + mouse_events: 1; + scale: 1; + description { + state: "default" 0.0; + visible: 0; + fixed: 1 1; + align: 0.5 0.0; + min: 48 66; + rel1 { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 { + relative: 0.0 0.0; + offset: 0 0; + } + image { + border: 0 0 0 0; + } + image.middle: SOLID; + fill.smooth: 0; + } + description { + state: "show" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + } + programs { + program { + name: "focused"; + signal: "elm,action,focus"; + source: "elm"; + action: STATE_SET "show" 0.0; + target: "handle"; + } + program { + name: "unfocused"; + signal: "elm,action,unfocus"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "handle"; + } + } + } + group { + name: "elm/entry/selection/block_handle_top"; + data.item: "position" "BOTH"; + parts { + part { + name: "bg"; + type: RECT; + scale: 1; + mouse_events: 1; + description { + state: "default" 0.0; + visible: 1; + fixed: 1 1; + align: 0.5 0.75; + min: 50 80; + color: 0 0 0 0; + } + } + part { + name: "handle"; + mouse_events: 1; + scale: 1; + description { + state: "default" 0.0; + visible: 0; + fixed: 1 1; + align: 0.5 1.0; + min: 48 66; + rel1 { + relative: 0.0 0.0; + offset: 0 0; + } + rel2 { + relative: 0.0 0.0; + offset: 0 0; + } + image { + border: 0 0 0 0; + } + image.middle: SOLID; + fill.smooth: 0; + } + description { + state: "show" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + } + programs { + program { + name: "focused"; + signal: "elm,action,focus"; + source: "elm"; + action: STATE_SET "show" 0.0; + target: "handle"; + } + program { + name: "unfocused"; + signal: "elm,action,unfocus"; + source: "elm"; + action: STATE_SET "default" 0.0; + target: "handle"; + } + } + } + group { + name: "elm/entry/anchor/default"; + parts { + part { + name: "bg"; + type: RECT; + scale: 1; + mouse_events: 0; + description { + state: "default" 0.0; + color: 128 0 0 64; + } + } + } + } +} \ No newline at end of file diff --git a/res/edje/home.edc b/res/edje/home.edc new file mode 100644 index 0000000..e035114 --- /dev/null +++ b/res/edje/home.edc @@ -0,0 +1,708 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "../../inc/conf.h" + +images { + image: "../images/home_button_bg.png" COMP; + image: "../images/home_icon_home.png" COMP; + image: "../images/home_icon_menu.png" COMP; + image: "../images/all_apps_icon_menu.png" COMP; + image: "../images/home_icon_reorder.png" COMP; +} + +collections { + group { + name: "home_ly"; + parts { + part { + name: "bg_spacer"; + type: SPACER; + scale: 0; + description { + state: "default" 0.0; + rel1.relative: 0.0 0.0; + rel2.relative: 1.0 1.0; + } + } + part { + name: "content"; + type: SWALLOW; + mouse_events: 1; + repeat_events: 1; + scale: 0; + description { + state: "default" 0.0; + rel1.relative: 0.0 0.0/*HOME_WGT_MIN_Y*/; + rel2.relative: 1.0 1.0/*HOME_WGT_MAX_Y*/; + } + } + + /*======================CHOOSER CAPTION=========================*/ + part { + name: "chooser_caption"; + type: SPACER; + scale: 0; + description { + state: "default" 0.0; + rel1.relative: 0.0 HOME_CHOOSER_CAPTION_Y_MIN; + rel2.relative: 1.0 HOME_CHOOSER_CAPTION_Y_MAX; + } + } + part { + name: PART_CHOOSER_CAPTION_MIDDLE_LABEL; + type: TEXT; + scale: 1; + description + { + state: "default" 0.0; + visible: 0; + color: 255 255 255 255; + text + { + align: 0.5 0.90; + text:"999 selected"; + size: 36; + } + rel1 + { + relative: 0.30 0.0; + to: "chooser_caption"; + } + rel2 + { + relative: 0.70 1.0; + to: "chooser_caption"; + } + } + description { + state: "chooser_activated" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { + name: PART_CHOOSER_CAPTION_LEFT_LABEL; + type: TEXT; + scale: 1; + description + { + color: 255 255 255 255; + state: "default" 0.0; + visible: 0; + text + { + align: 0.25 0.90; + size: 28; + text: "CANCEL"; + } + rel1 + { + relative: 0.0 0.0; + to: "chooser_caption"; + } + rel2 + { + relative: 0.33 1.0; + to: "chooser_caption"; + } + } + description { + state: "chooser_activated" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { + name: "chooser_caption_left_clickable_space"; + type: RECT; + mouse_events: 1; + scale: 0; + description + { + state: "default" 0.0; + color: 0 0 0 0; + visible: 0; + rel1 + { + to: "chooser_caption_left_label"; + relative: 0.0 0.0; + } + rel2 + { + to: "chooser_caption_left_label"; + relative: 1.0 1.0; + } + } + description { + state: "chooser_activated" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { + name: PART_CHOOSER_CAPTION_RIGHT_LABEL; + type: TEXT; + scale: 1; + description + { + state: "default" 0.0; + visible: 0; + color: 255 255 255 255; + text + { + align: (1.0 - 0.25) 0.90; + size: 28; + text: "DONE"; + } + rel1 + { + relative: 0.66 0.0; + to: "chooser_caption"; + } + rel2 + { + relative: 1.0 1.0; + to: "chooser_caption"; + } + } + description { + state: "chooser_activated" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { + name: "chooser_caption_right_clickable_space"; + type: RECT; + mouse_events: 1; + scale: 0; + description + { + state: "default" 0.0; + visible: 0; + color: 0 0 0 0; + rel1 + { + to: "chooser_caption_right_label"; + relative: 0.0 0.0; + } + rel2 + { + to: "chooser_caption_right_label"; + relative: 1.0 1.0; + } + } + description { + state: "chooser_activated" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + + /*==================== BUTTON : MENU IMPLEMENATION ===============*/ + part { + name: "menu_btn"; + type: SPACER; + scale: 0; + description { + state: "default" 0.0; + rel1.relative: HOME_MENU_BTN_X_MIN HOME_BTNS_Y_MIN; + rel2.relative: HOME_MENU_BTN_X_MAX HOME_BTNS_Y_MAX; + } + } + part { + name: "menu_btn_bg"; + type: IMAGE; + scale: 0; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; to: "menu_btn"; } + rel2 { relative: 1.0 1.0; to: "menu_btn"; } + color: 0 0 0 40; + visible: 1; + image { + normal: "../images/home_button_bg.png"; + } + } + description { + state: "press" 0.0; + inherit: "default" 0.0; + color: 255 255 255 40; + } + description { + state: "chooser_activated" 0.0; + visible: 0; + } + description + { + state: "all_apps_view_state" 0.0; + inherit: "default" 0.0; + } + description + { + state: "home_view_state" 0.0; + inherit: "default" 0.0; + } + description + { + state: "all_apps_edit_state" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + part { + name: "home_view_menu_icon"; + type: IMAGE; + mouse_events: 0; + repeat_events: 1; + scale: 0; + description + { + state: "default" 0.0; + rel1 { relative: 0.27 0.1; to: "menu_btn"; } + rel2 { relative: 0.73 0.9; to: "menu_btn"; } + color: 255 255 255 255; + visible: 1; + image + { + normal: "../images/home_icon_menu.png"; + } + } + description + { + state: "all_apps_view_state" 0.0; + inherit: "default" 0.0; + color: 255 255 255 0; + } + description + { + state: "home_view_state" 0.0; + inherit: "default" 0.0; + } + description + { + state: "all_apps_edit_state" 0.0; + inherit: "all_apps_view_state" 0.0; + visible: 0; + } + } + part + { + name: "all_apps_view_menu_icon"; + type: IMAGE; + mouse_events: 0; + repeat_events: 1; + scale: 0; + description + { + state: "default" 0.0; + rel1 { relative: 0.27 0.1; to: "menu_btn"; } + rel2 { relative: 0.73 0.9; to: "menu_btn"; } + color: 255 255 255 0; + visible: 1; + image + { + normal: "../images/all_apps_icon_menu.png"; + } + } + description + { + state: "chooser_activated" 0.0; + visible: 0; + } + description + { + state: "all_apps_view_state" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + } + description + { + state: "home_view_state" 0.0; + inherit: "default" 0.0; + } + description + { + state: "all_apps_edit_state" 0.0; + inherit: "all_apps_view_state" 0.0; + visible: 0; + } + } + + /*==================== BUTTON : HOME ICON IMPLEMENTATION ===============*/ + part { + name: "home"; + type: SPACER; + scale: 0; + description { + state: "default" 0.0; + rel1.relative: HOME_HOME_BTN_X_MIN HOME_BTNS_Y_MIN; + rel2.relative: HOME_HOME_BTN_X_MAX HOME_BTNS_Y_MAX; + } + } + part { + name: "home_btn_bg"; + type: IMAGE; + scale: 0; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; to: "home"; } + rel2 { relative: 1.0 1.0; to: "home"; } + color: 0 0 0 40; + visible: 1; + image { + normal: "../images/home_button_bg.png"; + } + } + description { + state: "press" 0.0; + inherit: "default" 0.0; + color: 255 255 255 40; + } + description { + state: "chooser_activated" 0.0; + visible: 0; + } + description + { + state: "all_apps_view_state" 0.0; + inherit: "default" 0.0; + } + description + { + state: "home_view_state" 0.0; + inherit: "default" 0.0; + } + description + { + state: "all_apps_edit_state" 0.0; + inherit: "default" 0.0; + visible: 0; + } + } + part + { + name: "home_view_home_icon"; + type: IMAGE; + mouse_events: 0; + repeat_events: 1; + scale: 0; + description + { + state: "default" 0.0; + rel1 { relative: 0.27 0.1; to: "home"; } + rel2 { relative: 0.73 0.9; to: "home"; } + color: 255 255 255 255; + visible: 1; + image + { + normal: "../images/home_icon_reorder.png"; + } + } + description + { + state: "chooser_activated" 0.0; + visible: 0; + } + description + { + state: "all_apps_view_state" 0.0; + inherit: "default" 0.0; + color: 255 255 255 0; + } + description + { + state: "home_view_state" 0.0; + inherit: "default" 0.0; + } + description + { + state: "all_apps_edit_state" 0.0; + inherit: "all_apps_view_state" 0.0; + visible: 0; + } + } + + part + { + name: "all_apps_view_home_icon"; + type: IMAGE; + mouse_events: 0; + repeat_events: 1; + scale: 0; + description + { + state: "default" 0.0; + rel1 { relative: 0.27 0.1; to: "home"; } + rel2 { relative: 0.73 0.9; to: "home"; } + color: 255 255 255 0; + visible: 1; + image + { + normal: "../images/home_icon_home.png"; + } + } + description + { + state: "chooser_activated" 0.0; + visible: 0; + } + description + { + state: "all_apps_view_state" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + } + description + { + state: "home_view_state" 0.0; + inherit: "default" 0.0; + color: 255 255 255 0; + } + description + { + state: "all_apps_edit_state" 0.0; + inherit: "all_apps_view_state" 0.0; + visible: 0; + } + } + + /*==================== DYNAMIC INDEX: ===============*/ + part { + name: PART_INDEX; + type: SWALLOW; + scale: 0; + description { + state: "default" 0.0; + rel1.relative: HOME_PG_INDEX_X_MIN HOME_BTNS_Y_MIN; + rel2.relative: HOME_PG_INDEX_X_MAX HOME_BTNS_Y_MAX; + } + } + + part { + name: PART_NEXT_PAGE_INDICE; + type: RECT; + scale: 0; + description { + state: "default" 0.0; + color: 20 20 100 100; + rel1.relative: INDICE_NEXT_PAGE_X_MIN HOME_WGT_MIN_Y; + rel2.relative: INDICE_NEXT_PAGE_X_MAX HOME_WGT_EDIT_MAX_Y; + visible: 0; + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { + name: PART_PREV_PAGE_INDICE; + type: RECT; + scale: 0; + description { + state: "default" 0.0; + color: 20 20 100 100; + rel1.relative: INDICE_PREV_PAGE_X_MIN HOME_WGT_MIN_Y; + rel2.relative: INDICE_PREV_PAGE_X_MAX HOME_WGT_EDIT_MAX_Y; + visible: 0; + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part { + name: PART_EVENT_BLOCKER; + type: RECT; + mouse_events: 1; + repeat_events: 0; + description { + state: "default" 0.0; + visible: 0; + rel1 {relative: 0.0 0.0; to: "bg_spacer";} + rel2 {relative: 1.0 1.0; to: "bg_spacer";} + color: 0 0 0 0; + } + description { + state: "blocked" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + } + /*============== PROGRAMS TO OPERATE ON bottom buttons =============*/ + programs { + program { + name: "menu_btn_down"; + signal: "mouse,down,1"; + source: "menu_btn_bg"; + action: STATE_SET "press" 0.0; + target: "menu_btn_bg"; + transition: DECELERATE 0.1; + } + program { + name: "menu_btn_up"; + signal: "mouse,up,1"; + source: "menu_btn_bg"; + action: STATE_SET "default" 0.0; + target: "menu_btn_bg"; + transition: DECELERATE 0.1; + } + program { + name: "menu_btn_click"; + signal: "mouse,clicked,1"; + source: "menu_btn_bg"; + action: SIGNAL_EMIT SIGNAL_MENU_BTN_CLICKED SIGNAL_SOURCE; + } + program { + name: "home_btn_down"; + signal: "mouse,down,1"; + source: "home_btn_bg"; + action: STATE_SET "press" 0.0; + target: "home_btn_bg"; + transition: DECELERATE 0.1; + } + program { + name: "home_btn_up"; + signal: "mouse,up,1"; + source: "home_btn_bg"; + action: STATE_SET "default" 0.0; + target: "home_btn_bg"; + transition: DECELERATE 0.1; + } + program { + name: "home_btn_click"; + signal: "mouse,clicked,1"; + source: "home_btn_bg"; + action: SIGNAL_EMIT SIGNAL_HOME_BTN_CLICKED SIGNAL_SOURCE; + } + program + { + name: "menu_icon_home_view_state_set"; + signal: SIGNAL_BOTTOM_BUTTONS_HOME_STATE_SET; + source: SIGNAL_SOURCE; + action: STATE_SET "home_view_state" 0.0; + target: "home_view_menu_icon"; + target: "all_apps_view_menu_icon"; + target: "home_view_home_icon"; + target: "all_apps_view_home_icon"; + target: "menu_btn_bg"; + target: "home_btn_bg"; + transition: LINEAR 0.3; + } + program + { + name: "menu_icon_all_apps_view_state_set"; + signal: SIGNAL_BOTTOM_BUTTONS_ALL_APPS_STATE_SET; + source: SIGNAL_SOURCE; + action: STATE_SET "all_apps_view_state" 0.0; + target: "home_view_menu_icon"; + target: "all_apps_view_menu_icon"; + target: "home_view_home_icon"; + target: "all_apps_view_home_icon"; + target: "menu_btn_bg"; + target: "home_btn_bg"; + transition: LINEAR 0.3; + } + program + { + name: "menu_icon_all_apps_edit_state_set"; + signal: SIGNAL_BOTTOM_BUTTONS_ALL_APPS_EDIT_STATE_SET; + source: SIGNAL_SOURCE; + action: STATE_SET "all_apps_edit_state" 0.0; + target: "home_view_menu_icon"; + target: "all_apps_view_menu_icon"; + target: "home_view_home_icon"; + target: "all_apps_view_home_icon"; + target: "menu_btn_bg"; + target: "home_btn_bg"; + } + + /*============== PROGRAMS TO OPERATE ON CHOOSER CAPTION =============*/ + program { + name: "chooser_caption_activate"; + signal: SIGNAL_CHOOSER_CAPTION_ACTIVATE; + source: SIGNAL_SOURCE; + action: STATE_SET "chooser_activated" 0.0; + target: "chooser_caption_middle_label"; + target: "chooser_caption_left_label"; + target: "chooser_caption_left_clickable_space"; + target: "chooser_caption_right_label"; + target: "chooser_caption_right_clickable_space"; + target: "all_apps_view_menu_icon"; + target: "menu_btn_bg"; + target: "home_btn_bg"; + target: "all_apps_view_home_icon"; + } + program { + name: "chooser_caption_deactivate"; + signal: SIGNAL_CHOOSER_CAPTION_DEACTIVATE; + source: SIGNAL_SOURCE; + action: STATE_SET "default" 0.0; + target: "chooser_caption_middle_label"; + target: "chooser_caption_left_label"; + target: "chooser_caption_left_clickable_space"; + target: "chooser_caption_right_label"; + target: "chooser_caption_right_clickable_space"; + target: "menu_btn_bg"; + target: "all_apps_view_menu_icon"; + target: "home_btn_bg"; + target: "all_apps_view_home_icon"; + } + /*============= PROGRAMS TO OPERATOE ON INDICES =====================*/ + program { + name: "next_page_indice_show"; + signal: SIGNAL_NEXT_PAGE_INDICE_SHOW; + source: SIGNAL_SOURCE; + action: STATE_SET "visible" 0.0; + target: PART_NEXT_PAGE_INDICE; + } + program { + name: "prev_page_indice_show"; + signal: SIGNAL_PREV_PAGE_INDICE_SHOW; + source: SIGNAL_SOURCE; + action: STATE_SET "visible" 0.0; + target: PART_PREV_PAGE_INDICE; + } + program { + name: "indice_off_program"; + signal: SIGNAL_INDICE_HIDE; + source: SIGNAL_SOURCE; + action: STATE_SET "default" 0.0; + target: PART_PREV_PAGE_INDICE; + target: PART_NEXT_PAGE_INDICE; + } + program { + name: "block_events"; + signal: SIGNAL_BLOCK_EVENTS; + source: SIGNAL_SOURCE; + action: STATE_SET "blocked" 0.0; + target: PART_EVENT_BLOCKER; + } + program { + name: "unblock_events"; + signal: SIGNAL_UNBLOCK_EVENTS; + source: SIGNAL_SOURCE; + action: STATE_SET "default" 0.0; + target: PART_EVENT_BLOCKER; + in: 0.1 0.0; + } + } + } +} diff --git a/res/edje/icon.edc b/res/edje/icon.edc new file mode 100644 index 0000000..73c2405 --- /dev/null +++ b/res/edje/icon.edc @@ -0,0 +1,627 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "../../inc/conf.h" + +images { + image: "../images/app_press_117.png" COMP; + image: "../images/btn_delete_nor.png" COMP; + image: "../images/btn_delete_press.png" COMP; + image: "../images/app_icon_checkbox_bg.png" COMP; + image: "../images/app_icon_checkbox_on.png" COMP; + image: "../images/app_icon_checkbox_border.png" COMP; + image: "../images/icon_badge_container.png" COMP; +} + +styles { + style{ + name: "icon_label"; + base: "font=Samsung Condensed:style=Regular align=center color=#FFFFFFFF font_size=28 wrap=mixed"; + } + style{ + name: "icon_label_edit"; + base: "font=Samsung Condensed:style=Regular align=center color=#FFFFFFFF font_size=25 wrap=mixed"; + } +} + +collections { + group { + name: "app_icon_layout"; + script { + public checkbox_state; + public alpha; + + public message(Msg_Type:type, id, ...) { + if(type == MSG_INT_SET) + { + set_int(alpha, getarg(2)); + send_message(type, id, getarg(2)); + } + } + } + parts { + part { //"icon_bg" + name: "icon_bg"; + type: SPACER; + mouse_events: 1; + repeat_events: 1; + scale: 0; + description { + state: "default" 0.0; + rel1{relative: 0.0 0.0; } + rel2{relative: 1.0 1.0; } + } + description { + state: "moved" 0.0; + inherit: "default" 0.0; + } + description { + state: "edit" 0.0; + inherit: "default" 0.0; + } + description + { + state: "manage_state" 0.0; + inherit: "default" 0.0; + } + } + + part { //PART_ICON_CONTENT + name: PART_ICON_CONTENT; + type: SWALLOW; + mouse_events: 1; + repeat_events: 1; + scale: 0; + description { + state: "default" 0.0; + rel1{relative: ICON_X_MIN ICON_Y_MIN; to: "icon_bg";} + rel2{relative: ICON_X_MAX ICON_Y_MAX; to: "icon_bg";} + } + } + + + part { //"icon_content_touch" + name: "icon_content_touch"; + type: IMAGE; + mouse_events: 1; + repeat_events: 1; + scale: 0; + description { + state: "default" 0.0; + rel1{relative: 0.0 0.0; to: PART_ICON_CONTENT;} + rel2{relative: 1.0 1.0; to: PART_ICON_CONTENT;} + aspect: 1.0 1.0; + aspect_preference: BOTH; + color: 0 0 0 0; + image { + normal: "../images/app_press_117.png"; + } + } + description{ + state: "icon_touched" 0.0; + inherit: "default" 0.0; + color: 0 0 0 150; + } + } + + part { //PART_ICON_NAME + name: PART_ICON_NAME; + type: TEXTBLOCK; + mouse_events: 1; + repeat_events: 1; + scale: 1; + description { + state: "default" 0.0; + rel1{relative: ICON_NAME_X_MIN ICON_NAME_Y_MIN; to: "icon_bg";} + rel2{relative: ICON_NAME_X_MAX ICON_NAME_Y_MAX; to: "icon_bg";} + color: 255 255 255 255; + text { + style: "icon_label"; + align: 0.5 0.0; + } + } + description { + state: "edit" 0.0; + inherit: "default" 0.0; + rel1{relative: ICON_NAME_X_MIN ICON_NAME_Y_MIN; to: "icon_bg";} + rel2{relative: ICON_NAME_X_MAX 1.0; to: "icon_bg";} + text { + style: "icon_label_edit"; + } + } + description { + state: "black_text" 0.0; + inherit: "default" 0.0; + color: 0 0 0 255; + } + description { + state: "black_edit" 0.0; + inherit: "black_text" 0.0; + text { + style: "icon_label_edit"; + } + } + } + + + /*************************** BADGE *************************************/ + + part + { + name: "icon_badge"; + type: IMAGE; + scale: 0; + description + { + state: "default" 0.0; + rel1{relative: 0.0 0.0; offset: -10 -1; to: "icon_badge_text";} + rel2{relative: 1.0 1.0; offset: 9 1; to: "icon_badge_text";} + visible: 0; + image + { + normal: "../images/icon_badge_container.png"; + border: 15 14 0 0; + } + } + description + { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + + part + { + name: "icon_badge_text"; + type: TEXT; + scale: 1; + description + { + state: "default" 0.0; + visible: 0; + fixed: 1 1; + color: 255 255 255 255; + rel1{relative: BADGE_REL_X BADGE_REL_Y; to: "icon_bg";} + rel2{relative: BADGE_REL_X BADGE_REL_Y; to: "icon_bg";} + align: 1.0 0.0; + text + { + font: "arial"; + size: 32; + text_class: "ATO002"; + min: 1 1; + max: 1 1; + } + } + description + { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + + /*************************** END OF BADGE *************************************/ + + part { //"icon_uninstall_button"; + name: "icon_uninstall_button"; + type: IMAGE; + scale: 0; + description { + state: "default" 0.0; + rel1{relative: 0.0 0.0; to: "icon_bg";} + rel2{relative: ICON_UNINSTALL_BTN_X_MAX ICON_UNINSTALL_BTN_Y_MAX; to: "icon_bg";} + color: 255 255 255 0; + visible: 0; + aspect: 1.0 1.0; + aspect_preference: BOTH; + image { + normal: "../images/btn_delete_nor.png"; + } + } + description { + state: "show" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + visible: 1; + } + description { + state: "press" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + image { + normal: "../images/btn_delete_press.png"; + } + visible: 1; + } + } + + /*Icons checkboxes in choose state:*/ + part { //"icon_checkbox_bg"; + name: "icon_checkbox_bg"; + type: IMAGE; + scale: 0; + description { + state: "default" 0.0; + rel1{relative: ICON_BADGE_CHECKBOX_REL1_X ICON_BADGE_CHECKBOX_REL1_Y; to: "icon_bg";} + rel2{relative: ICON_BADGE_CHECKBOX_REL2_X ICON_BADGE_CHECKBOX_REL2_Y; to: "icon_bg";} + color: 255 255 255 120; + visible: 0; + aspect: 1.0 1.0; + aspect_preference: BOTH; + //TODO: image from home-lite is used... + image { + normal: "../images/app_icon_checkbox_bg.png"; + } + } + description { + state: "blank" 0.0; + inherit: "default" 0.0; + visible: 1; + } + description { + state: "checked" 0.0; + inherit: "default" 0.0; + //color_class: "ATO005"; + color: 255 255 255 255; + visible: 1; + } + } + + part { //"icon_checkbox_border"; + name: "icon_checkbox_border"; + type: IMAGE; + scale: 0; + description { + state: "default" 0.0; + rel1{relative: 0.0 0.0; to: "icon_checkbox_bg";} + rel2{relative: 1.0 1.0; to: "icon_checkbox_bg";} + color: 255 255 255 0; + visible: 0; + aspect: 1.0 1.0; + aspect_preference: BOTH; + image { + normal: "../images/app_icon_checkbox_border.png"; + } + } + description { + state: "blank" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + visible: 1; + } + description { + state: "checked" 0.0; + inherit: "default" 0.0; + color: 255 255 255 120; + visible: 1; + } + } + + part { //"icon_checkbox" + name: "icon_checkbox"; + type: IMAGE; + scale: 0; + description { + state: "default" 0.0; + rel1{relative: 0.0 0.0; to: "icon_checkbox_bg";} + rel2{relative: 1.0 1.0; to: "icon_checkbox_bg";} + color: 255 255 255 0; + visible: 0; + aspect: 1.0 1.0; + aspect_preference: BOTH; + image { + normal: "../images/app_icon_checkbox_on.png"; + } + } + description { + state: "blank" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + visible: 0; + } + description { + state: "checked" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + visible: 1; + } + } + + part { //checkbox_click_area + name: "checkbox_click_area"; + type: RECT; + scale: 0; + description { + state: "default" 0.0; + color: 0 0 0 0; + rel1 { + relative: -0.2 -0.2; + to: "icon_checkbox"; + } + rel2 { + relative: 1.2 1.2; + to: "icon_checkbox"; + } + visible: 0; + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + } + + programs { + program { + name: "group_loaded"; + signal: "load"; + source: ""; + script { + set_int(checkbox_state, 0); + } + } + program { + name: "icon_clicked_program"; + signal :"mouse,clicked,1"; + source: "icon_content"; + action: SIGNAL_EMIT SIGNAL_ICON_CLICKED SIGNAL_SOURCE; + //after: program with change the icon shadow state to clicked! + } + + program { + name: "icon_touch_program"; + signal: SIGNAL_ICON_PRESS; + source: SIGNAL_PRESS_SOURCE; + action: STATE_SET "icon_touched" 0.0; + target: "icon_content_touch"; + transition: LINEAR 0.1; + } + + program { + name: "icon_touch_release_program"; + signal: "mouse,up,1"; + source: "icon_content_touch"; + action: STATE_SET "default" 0.0; + target: "icon_content_touch"; + transition: LINEAR 0.1; + } + program { + name: "edit_mode_on"; + signal: SIGNAL_EDIT_MODE_ON; + source: SIGNAL_SOURCE; + action: STATE_SET "edit" 0.0; + target: PART_ICON_NAME; + } + program { + name: "edit_mode_off"; + signal: SIGNAL_EDIT_MODE_OFF; + source: SIGNAL_SOURCE; + action: STATE_SET "default" 0.0; + target: PART_ICON_NAME; + } + program { + name: "edit_mode_black_on"; + signal: SIGNAL_EDIT_MODE_BLACK_ON; + source: SIGNAL_SOURCE; + action: STATE_SET "black_edit" 0.0; + target: PART_ICON_NAME; + } + program { + name: "edit_mode_black_off"; + signal: SIGNAL_EDIT_MODE_BLACK_OFF; + source: SIGNAL_SOURCE; + action: STATE_SET "black_text" 0.0; + target: PART_ICON_NAME; + } + program { + name: "uninstall_button_show"; + signal: SIGNAL_UNINSTALL_BUTTON_SHOW; + source: SIGNAL_SOURCE; + action: STATE_SET "show" 0.0; + target: "icon_uninstall_button"; + transition: DECELERATE 0.20; + } + program { + name: "uninstall_button_hide"; + signal: SIGNAL_UNINSTALL_BUTTON_HIDE; + source: SIGNAL_SOURCE; + action: STATE_SET "default" 0.0; + target: "icon_uninstall_button"; + transition: DECELERATE 0.20; + } + program { + name: "uninstall_button_clicked"; + signal: "mouse,clicked,1"; + source: "icon_uninstall_button"; + action: SIGNAL_EMIT SIGNAL_UNINSTALL_BUTTON_CLICKED SIGNAL_SOURCE; + } + program { + name: "uninstall_button_mouse_down"; + signal: "mouse,down,1"; + source: "icon_uninstall_button"; + action: STATE_SET "press" 0.0; + target: "icon_uninstall_button"; + transition: DECELERATE 0.20; + } + program { + name: "uninstall_button_mouse_up"; + signal: "mouse,up,1"; + source: "icon_uninstall_button"; + action: STATE_SET "show" 0.0; + target: "icon_uninstall_button"; + transition: DECELERATE 0.20; + } + + //Checkbox + program { + name: "checkbox_show_unchecked"; + signal: SIGNAL_CHECKBOX_SHOW_UNCHECKED; + source: SIGNAL_SOURCE; + script { + set_int(checkbox_state, 0); + emit("checkbox,blank,show", SIGNAL_SOURCE); + } + after: "checkbox_area_visible"; + } + program { + name: "checkbox_show_checked"; + signal: SIGNAL_CHECKBOX_SHOW_CHECKED; + source: SIGNAL_SOURCE; + script { + set_int(checkbox_state, 1); + emit("checkbox,checked,show", SIGNAL_SOURCE); + } + after: "checkbox_area_visible"; + } + program { + name: "checkbox_blank_show"; + signal: "checkbox,blank,show"; + source: SIGNAL_SOURCE; + action: STATE_SET "blank" 0.0; + target: "icon_checkbox"; + target: "icon_checkbox_border"; + target: "icon_checkbox_bg"; + } + program { + name: "checkbox_hide"; + signal: SIGNAL_CHECKBOX_HIDE; + source: SIGNAL_SOURCE; + action: STATE_SET "default" 0.0; + target: "icon_checkbox"; + target: "icon_checkbox_border"; + target: "icon_checkbox_bg"; + transition: DECELERATE 0.20; + after: "checkbox_area_hide"; + } + program { + name: "checkbox_checked_show"; + signal: "checkbox,checked,show"; + source: SIGNAL_SOURCE; + action: STATE_SET "checked" 0.0; + target: "icon_checkbox"; + target: "icon_checkbox_border"; + target: "icon_checkbox_bg"; + transition: DECELERATE 0.20; + } + program { + name: "checkbox_clicked"; + signal: "mouse,clicked,1"; + source: "checkbox_click_area"; + script { + if (get_int(checkbox_state) == 0) { + set_int(checkbox_state, 1); //isnt it deprecated? + emit("checkbox,checked,show", SIGNAL_SOURCE); //signal for edje state change + emit("checkbox,checked", SIGNAL_SOURCE); //signal for C listener + } + else { + set_int(checkbox_state, 0); + emit("checkbox,blank,show", SIGNAL_SOURCE); //signal for edje state change + emit("checkbox,unchecked", SIGNAL_SOURCE); //signal for C listener + } + } + } + /*This is when ALLs are in management mode:*/ + program { + name: "set_manage_state_program"; + signal: "set_manage_state"; + source: SIGNAL_SOURCE; + action: STATE_SET "manage_state" 0.0; + target: "icon_bg"; + transition: DECELERATE 0.2; + } + /*This is default for ALLs: */ + program { + name: "unset_manage_state_program"; + signal: "unset_manage_state"; + source: SIGNAL_SOURCE; + action: STATE_SET "default" 0.0; + target: "icon_bg"; + transition: DECELERATE 0.2; + } + program { + name: "program_no_text"; + signal: SIGNAL_LABEL_HIDE; + source: SIGNAL_SOURCE; + action: STATE_SET "no_text" 0.0; + target: PART_ICON_NAME; + } + program { + name: "program_black_text"; + signal: "label,text,black"; + source: SIGNAL_SOURCE; + action: STATE_SET "black_text" 0.0; + target: PART_ICON_NAME; + } + program { + name: "program_default"; + signal: SIGNAL_LABEL_SHOW; + source: SIGNAL_SOURCE; + action: STATE_SET "default" 0.0; + target: PART_ICON_NAME; + transition: DECELERATE 0.20; + } + program { + name: "icon_badge_show"; + signal: SIGNAL_BADGE_SHOW; + source: SIGNAL_SOURCE; + action: STATE_SET "visible" 0.0; + target: "icon_badge"; + target: "icon_badge_text"; + } + program { + name: "icon_badge_hide"; + signal: SIGNAL_BADGE_HIDE; + source: SIGNAL_SOURCE; + action: STATE_SET "default" 0.0; + target: "icon_badge"; + target: "icon_badge_text"; + } + program { + name: "checkbox_area_visible"; + action: STATE_SET "visible" 0.0; + target: "checkbox_click_area"; + } + program { + name: "checkbox_area_hide"; + action: STATE_SET "default" 0.0; + target: "checkbox_click_area"; + } + program { + name: "area,clicked"; + signal: "mouse,clicked,1"; + source: "checkbox_click_area"; + action: SIGNAL_EMIT "mouse,clicked,1" "icon_checkbox"; + } + program { + name: "checkbox,block"; + signal: SIGNAL_CHECKBOX_BLOCK; + source: SIGNAL_SOURCE; + action: STATE_SET "default" 0.0; + target: "checkbox_click_area"; + } + program { + name: "checkbox,unblock"; + signal: SIGNAL_CHECKBOX_UNBLOCK; + source: SIGNAL_SOURCE; + action: STATE_SET "visible" 0.0; + target: "checkbox_click_area"; + } + } + } +} diff --git a/res/edje/index_element.edc b/res/edje/index_element.edc new file mode 100644 index 0000000..ef964e8 --- /dev/null +++ b/res/edje/index_element.edc @@ -0,0 +1,113 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "../../inc/conf.h" + +collections { + group { + name: GROUP_INDEX_ELEMENT; + + images { + image: "../images/core_page_indicator_on.png" COMP; + image: "../images/core_page_indicator_on_horizontal.png" COMP; + } + + script { + public rot; + public alpha; + + public message(Msg_Type:type, id, ...) { + if(type == MSG_FLOAT_SET) + { + set_float(rot, getfarg(2)); + set_float(alpha, getfarg(3)); + send_message(type, id, getfarg(2), getfarg(3)); + } + } + } + + parts { + part { + name: INDICE_SIZE_SETTER; + type: SWALLOW; + description { + state: "default" 0.0; + rel1 {relative: 0.0 0.0;} + rel2 {relative: 1.0 1.0;} + } + } + part { + name: "element"; + type: IMAGE; + + description { + state: "default" 0.0; + color: 255 255 255 75; + rel1 {relative: 0.0 0.0; to: INDICE_SIZE_SETTER;} + rel2 {relative: 1.0 1.0; to: INDICE_SIZE_SETTER;} + image { + normal: "../images/core_page_indicator_on_horizontal.png"; + } + map { + on: 1; + perspective_on: 1; + smooth: 1; + alpha: 1; + + } + } + description { + state: "current" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + image { + normal: "../images/core_page_indicator_on.png"; + } + } + } + } + + programs { + program { + name: "rotation,change"; + signal: "rot_changed"; + source: "ly"; + script { + custom_state(PART:"element", "default", 0.0); + set_state_val(PART:"element", STATE_MAP_ROT_Z, get_float(rot)); + set_state_val(PART:"element", STATE_COLOR, 255, 255, 255, round(get_float(alpha))); + set_state(PART:"element", "custom", 0.0); + } + } + program + { + name: "indice_set_default"; + signal: SIGNAL_SET_DEFAULT; + source: "layout"; + action: STATE_SET "default" 0.0; + target: "element"; + } + program + { + name: "indice_set_current"; + signal: SIGNAL_SET_CURRENT; + source: "layout"; + action: STATE_SET "current" 0.0; + target: "element"; + } + } + } +} diff --git a/res/edje/livebox_container.edc b/res/edje/livebox_container.edc new file mode 100644 index 0000000..94045ca --- /dev/null +++ b/res/edje/livebox_container.edc @@ -0,0 +1,622 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "../../inc/conf.h" + +images +{ + image: "../images/btn_delete_nor.png" COMP; + image: "../images/edit_all_page_create.png" COMP; + image: "../images/frame.png" COMP; + image: "../images/resize_button.png" COMP; +} + +collections { + group { + ///@todo it would rather be named livebox_scroller_page + name: "livebox_container"; + + parts { + part { + //background fills the whole page in pagescroller + name: "bg"; + scale: 1; + type: SWALLOW; + description { + state: "default" 0.0; + rel1 + { + relative: 0.0 CONTENT_Y_MIN; + } + rel2 { + relative: 1.0 CONTENT_Y_MAX; + } + } + } + + part + { + name: "grid_bg"; + scale: 1; + type: SWALLOW; + description + { + state: "default" 0.0; + visible: 1; + rel1 + { + relative: 0.0 0.0; to: "content"; + } + rel2 + { + relative: 1.0 1.0; to: "content"; + } + } + description + { + state: "hidden" 0.0; + inherit: "default"; + visible: 0; + } + + } + + part { + name: "edit_dim"; + scale: 1; + type: RECT; + repeat_events: 1; + description { + state: "default" 0.0; + rel1 {relative: 0.0 0.0; to: "content";} + rel2 {relative: 1.0 1.0; to: "content";} + color: 0 0 0 40; + visible: 0; + } + description { + state: "edit"; + inherit: "default" 0.0; + visible: 1; + } + } + + part { + name : "add_page_button"; + scale: 1; + type: IMAGE; + description { + state: "default" 0.0; + rel1 {relative: LIVEBOX_ADD_PAGE_BUTTON_X_MIN LIVEBOX_ADD_PAGE_BUTTON_Y_MIN; to: "edit_dim";} + rel2 {relative: LIVEBOX_ADD_PAGE_BUTTON_X_MAX LIVEBOX_ADD_PAGE_BUTTON_Y_MAX; to: "edit_dim";} + image { + normal: "../images/edit_all_page_create.png"; + } + aspect_preference: BOTH; + visible: 0; + } + description { + state: "visible"; + inherit: "default" 0.0; + visible: 1; + } + } + + part { + //content is smaller than the background and positioned in the center + name: "content"; + scale: 1; + type: SWALLOW; + description { + state: "default" 0.0; + rel1 { relative: LIVEBOX_X_MIN 0.0; to: "bg";} + rel2 { relative: LIVEBOX_X_MAX 1.0; to: "bg";} + fixed: 1 1; + } + description { + state: "edit" 0.0; + rel1 {relative: LIVEBOX_EDIT_X_MIN LIVEBOX_EDIT_Y_MIN; to: "bg";} + rel2 {relative: LIVEBOX_EDIT_X_MAX LIVEBOX_EDIT_Y_MAX; to: "bg";} + } + } + + part { + name: "remove_button"; + scale: 1; + type: IMAGE; + mouse_events: 1; + description { + state: "default" 0.0; + rel1{relative: 0.0 0.0; to: "content";} + rel2{relative: 1.0 1.0; to: "content";} + color: 255 255 255 255; + visible: 0; + aspect: 1.0 1.0; + align: 0.0 0.0; + min: LIVEBOX_REMOVE_BUTTON_SIZE LIVEBOX_REMOVE_BUTTON_SIZE; + max: LIVEBOX_REMOVE_BUTTON_SIZE LIVEBOX_REMOVE_BUTTON_SIZE; + aspect_preference: BOTH; + fixed: 1 1; + image { + normal: "../images/btn_delete_nor.png"; + } + } + description { + state: "show" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + +// ================================================================================= + part + { + name: "slider.vertical"; + type: SPACER; + scale: 1; + repeat_events: 1; + description + { + state: "default" 0.0; + align: 0.5 0.5; + rel1 + { + relative: 0.0 -0.025; + to_x: "button.left"; + to_y: "content"; + } + rel2 + { + relative: 1.0 1.03; + to_x: "button.right"; + to_y: "content"; + } + + min: LIVEBOX_SLIDER_BUTTON_SIZE 0; + max: LIVEBOX_SLIDER_BUTTON_SIZE -1; + } + } + part + { + name: "button.down"; + type: IMAGE; + scale: 1; + mouse_events: 1; + repeat_events: 0; + + dragable { + confine: "slider.vertical"; + x: 0 0 0; + y: 1 1 10; + } + description + { + state: "default" 0.0; + color: 0 255 0 255; + align: 0.5 0.5; + visible: 1; + min: LIVEBOX_SLIDER_BUTTON_SIZE LIVEBOX_SLIDER_BUTTON_SIZE; + + image + { + normal: "../images/resize_button.png"; + } + } + description + { + state: "button,warning" 0.0; + inherit: "default"; + color: 255 0 0 255; + } + description + { + state: "hidden"; + inherit: "default"; + visible: 0; + } + } + part + { + name: "button.up"; + type: IMAGE; + scale: 1; + mouse_events: 1; + repeat_events: 0; + + dragable + { + confine: "slider.vertical"; + x: 0 0 0; + y: 1 1 10; + } + + description + { + state: "default" 0.0; + color: 0 255 0 255; + align: 0.5 0.5; + visible: 1; + min: LIVEBOX_SLIDER_BUTTON_SIZE LIVEBOX_SLIDER_BUTTON_SIZE; + + image + { + normal: "../images/resize_button.png"; + } + } + description + { + state: "button,warning" 0.0; + inherit: "default"; + color: 255 0 0 255; + } + description + { + state: "hidden"; + inherit: "default"; + visible: 0; + } + } + + part + { + name: "slider.horizontal"; + type: SPACER; + scale: 1; + repeat_events: 1; + + description + { + state: "default" 0.0; + align: 0.5 0.5; + + rel1 + { + relative: -0.025 0.0; + to_x: "content"; + to_y: "button.up"; + } + rel2 + { + relative: 1.03 1.0; + to_x: "content"; + to_y: "button.down"; + } + + min: 0 LIVEBOX_SLIDER_BUTTON_SIZE; + max: -1 LIVEBOX_SLIDER_BUTTON_SIZE; + } + } + part + { + name: "button.right"; + type: IMAGE; + scale: 1; + mouse_events: 1; + repeat_events: 0; + + dragable + { + confine: "slider.horizontal"; + x: 1 1 10; + y: 0 0 0; + } + + description + { + state: "default" 0.0; + color: 0 255 0 255; + align: 0.5 0.5; + min: LIVEBOX_SLIDER_BUTTON_SIZE LIVEBOX_SLIDER_BUTTON_SIZE; + max: LIVEBOX_SLIDER_BUTTON_SIZE LIVEBOX_SLIDER_BUTTON_SIZE; + rel1 + { + relative: 0.90 0.0; + to_y: "button.up"; + } + rel2 + { + relative: 1.00 1.0; + to_y: "button.down"; + } + + image + { + normal: "../images/resize_button.png"; + } + } + description + { + state: "button,warning" 0.0; + inherit: "default"; + color: 255 0 0 255; + } + description + { + state: "hidden"; + inherit: "default"; + visible: 0; + } + } + part + { + name: "button.left"; + type: IMAGE; + scale: 1; + mouse_events: 1; + repeat_events: 0; + + dragable + { + confine: "slider.horizontal"; + x: 1 1 10; + y: 0 0 0; + } + + description + { + state: "default" 0.0; + color: 0 255 0 255; + align: 0.5 0.5; + min: LIVEBOX_SLIDER_BUTTON_SIZE LIVEBOX_SLIDER_BUTTON_SIZE; + max: LIVEBOX_SLIDER_BUTTON_SIZE LIVEBOX_SLIDER_BUTTON_SIZE; + visible: 1; + rel1 + { + relative: 0.0 1.0; + to_y: "button.up"; + } + rel2 + { + relative: 0.1 0.0; + to_y: "button.down"; + } + + image + { + normal: "../images/resize_button.png"; + } + } + description + { + state: "button,warning" 0.0; + inherit: "default"; + color: 255 0 0 255; + } + description + { + state: "hidden"; + inherit: "default"; + visible: 0; + } + } + + part { + name: "event_blocker"; + type: RECT; + mouse_events: 1; + repeat_events: 1; + description { + state: "default" 0.0; + fixed: 1 1; + color: 0 0 0 0; + visible: 0; + rel1 { relative: 0.0 0.0; to: "content";} + rel2 { relative: 1.0 1.0; to: "content";} + } + description { + state: "show" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + + part { + name : "frame"; + type: IMAGE; + mouse_events: 0; + repeat_events: 1; + description { + state: "default" 0.0; + rel1 + { + relative: LIVEBOX_RESIZE_FRAME_REL_1 LIVEBOX_RESIZE_FRAME_REL_1; + to_x: "button.left"; + to_y: "button.up"; + } + rel2 + { + relative: LIVEBOX_RESIZE_FRAME_REL_2 LIVEBOX_RESIZE_FRAME_REL_2; + to_x: "button.right"; + to_y: "button.down"; + } + image { + normal: "../images/frame.png"; + border: 20 20 20 20; + } + color: 0 255 0 255; + visible: 1; + } + description { + state: "hidden"; + inherit: "default" 0.0; + visible: 0; + } + description { + state: "button,warning"; + inherit: "default" 0.0; + color: 255 0 0 255; + } + } + +// =========================================================================== + programs { + //Remove button + program { + name: "remove_button_show"; + signal: "remove_button,show"; + source: "layout"; + action: STATE_SET "show" 0.0; + target: "remove_button"; + transition: DECELERATE 0.20; + } + program { + name: "event_blocker_show"; + action: STATE_SET "show" 0.0; + target: "event_blocker"; + } + + program { + name: "remove_button_hide"; + signal: "remove_button,hide"; + source: "layout"; + action: STATE_SET "default" 0.0; + target: "remove_button"; + transition: DECELERATE 0.20; + } + program { + name: "remove_button_hide_instant"; + signal: "remove_button,hide,instant"; + source: "layout"; + action: STATE_SET "default" 0.0; + target: "remove_button"; + after: "event_blocker_hide"; + } + program { + name: "event_blocker_hide"; + action: STATE_SET "default" 0.0; + target: "event_blocker"; + } + + program { + name: "remove_button_clicked"; + signal: "mouse,clicked,1"; + source: "remove_button"; + action: SIGNAL_EMIT "remove_button,clicked" "layout"; + } + +// ========================================================================= + program + { + name: "drag,outside"; + signal: "drag,outside"; + source: "livebox"; + action: STATE_SET "button,warning" 0.0; + target: "button.left"; + target: "button.right"; + target: "button.up"; + target: "button.down"; + target: "frame"; + } + program + { + name: "drag,ok"; + signal: "drag,ok"; + source: "livebox"; + action: STATE_SET "default" 0.0; + target: "button.left"; + target: "button.right"; + target: "button.up"; + target: "button.down"; + target: "frame"; + } + + program + { + name: "sliders,hide"; + signal: "sliders,hide"; + source: "livebox"; + action: STATE_SET "hidden" 0.0; + target: "button.left"; + target: "button.right"; + target: "button.up"; + target: "button.down"; + target: "frame"; + } + + program + { + name: "sliders,show"; + signal: "sliders,show"; + source: "livebox"; + action: STATE_SET "default" 0.0; + target: "button.left"; + target: "button.right"; + target: "button.up"; + target: "button.down"; + target: "frame"; + } +// ================================================================================================== + + program + { + name: "grid,hide"; + signal: SIGNAL_GRID_SHADOW_HIDE; + source: PART_GRID_BG; + action: STATE_SET "hidden" 0.0; + target: "grid_bg"; + } + + program + { + name: "grid,show"; + signal: SIGNAL_GRID_SHADOW_SHOW; + source: PART_GRID_BG; + action: STATE_SET "default" 0.0; + target: "grid_bg"; + } + + +// ================================================================================================== + + program { + name: "edit_start"; + signal: "edit,start"; + source: "layout"; + action: STATE_SET "edit" 0.0; + target: "edit_dim"; + target: "content"; + } + program { + name: "edit_stop"; + signal: "edit,stop"; + source: "layout"; + action: STATE_SET "default" 0.0; + target: "edit_dim"; + target: "content"; + } + program { + name: "add_show"; + signal: "add,show"; + source: "layout"; + action: STATE_SET "visible" 0.0; + target: "add_page_button"; + } + program { + name: "add_hide"; + signal: "add,hide"; + source: "layout"; + action: STATE_SET "default" 0.0; + target: "add_page_button"; + } + program + { + name: "add_page_clicked"; + signal: "mouse,clicked,1"; + source: "add_page_button"; + action: SIGNAL_EMIT "add_page_button_clicked" "layout"; + } + } + } +} diff --git a/res/edje/livebox_layout.edc b/res/edje/livebox_layout.edc new file mode 100644 index 0000000..1a3ac96 --- /dev/null +++ b/res/edje/livebox_layout.edc @@ -0,0 +1,176 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "../../inc/conf.h" + +images +{ + image: "../images/btn_delete_nor.png" COMP; + image: "../images/reposition_bg.png" COMP; + image: "../images/reposition_bg_shadow.png" COMP; +} + +collections +{ + group + { + name: "livebox"; + parts + { + part + { + name: "reposition_bg"; + type: IMAGE; + scale: 1; + mouse_events: 0; + repeat_events: 1; + description + { + state: "default" 0.0; + rel1{relative: 0.0 0.0; to: "livebox";} + rel2{relative: 1.0 1.0; to: "livebox";} + color: LIVEBOX_REPOSITION_BG_COLOR LIVEBOX_REPOSITION_BG_COLOR LIVEBOX_REPOSITION_BG_COLOR 0; + image + { + normal: "../images/reposition_bg.png"; + border: LIVEBOX_REPOSITION_BG_BORDER LIVEBOX_REPOSITION_BG_BORDER LIVEBOX_REPOSITION_BG_BORDER LIVEBOX_REPOSITION_BG_BORDER; + } + } + description + { + state: "visible" 0.0; + inherit: "default" 0.0; + color: LIVEBOX_REPOSITION_BG_COLOR LIVEBOX_REPOSITION_BG_COLOR LIVEBOX_REPOSITION_BG_COLOR LIVEBOX_REPOSITION_BG_COLOR; + } + } + + part + { + name: "livebox"; + type: SWALLOW; + scale: 1; + mouse_events: 1; + description + { + state: "default" 0.0; + visible: 1; + rel1.relative: 0.0 0.0; + rel2.relative: 1.0 1.0; + } + } + + part + { + name: "remove_button_rect"; + type: SPACER; + scale: 1; + mouse_events: 1; + description + { + state: "default" 0.0; + rel1{relative: 0.0 0.0; to: "livebox";} + rel2{relative: 1.0 1.0; to: "livebox";} + align: 0.0 0.0; + aspect: 1.0 1.0; + min: LIVEBOX_REMOVE_LB_BUTTON_SIZE+LIVEBOX_REMOVE_LB_OFFSET_X LIVEBOX_REMOVE_LB_BUTTON_SIZE+LIVEBOX_REMOVE_LB_OFFSET_Y; + max: LIVEBOX_REMOVE_LB_BUTTON_SIZE+LIVEBOX_REMOVE_LB_OFFSET_X LIVEBOX_REMOVE_LB_BUTTON_SIZE+LIVEBOX_REMOVE_LB_OFFSET_Y; + aspect_preference: BOTH; + fixed: 1 1; + + } + } + + part + { + name: "remove_button"; + type: IMAGE; + scale: 1; + mouse_events: 1; + repeat_events: 0; + description + { + state: "default" 0.0; + visible: 0; + rel1{relative: 0.0 0.0; to: "remove_button_rect";} + rel2{relative: 1.0 1.0; to: "remove_button_rect";} + align: 1.0 1.0; + aspect: 1.0 1.0; + min: LIVEBOX_REMOVE_LB_BUTTON_SIZE LIVEBOX_REMOVE_LB_BUTTON_SIZE; + max: LIVEBOX_REMOVE_LB_BUTTON_SIZE LIVEBOX_REMOVE_LB_BUTTON_SIZE; + aspect_preference: BOTH; + fixed: 1 1; + image + { + normal: "../images/btn_delete_nor.png"; + } + } + description + { + state: "show" 0.0; + inherit: "default" 0.0; + color: 255 255 255 255; + visible: 1; + } + } + } + + programs { + //Remove button + program { + name: "remove_button_show"; + signal: "remove_button,show"; + source: "livebox"; + action: STATE_SET "show" 0.0; + target: "remove_button"; + transition: DECELERATE 0.20; + } + + program { + name: "remove_button_hide"; + signal: "remove_button,hide"; + source: "livebox"; + action: STATE_SET "default" 0.0; + target: "remove_button"; + transition: DECELERATE 0.20; + } + + program { + name: "remove_button_hide_instant"; + signal: "remove_button,hide,instant"; + source: "livebox"; + action: STATE_SET "default" 0.0; + target: "remove_button"; + } + + + program { + name: "reposition_bg_show"; + signal: "reposition_bg,show"; + source: "livebox"; + action: STATE_SET "visible" 0.0; + target: "reposition_bg"; + } + + program { + name: "reposition_bg_hide"; + signal: "reposition_bg,hide"; + source: "livebox"; + action: STATE_SET "default" 0.0; + target: "reposition_bg"; + } + } + } +} diff --git a/res/edje/page_edit.edc b/res/edje/page_edit.edc new file mode 100644 index 0000000..6d010dd --- /dev/null +++ b/res/edje/page_edit.edc @@ -0,0 +1,292 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "page_edit_util.edc" +#include "../../inc/conf.h" + +images { + image: "../images/btn_delete_nor.png" COMP; + image: "../images/btn_delete_press.png" COMP; + image: "../images/edit_all_page_drag.png" COMP; + image: "../images/edit_all_page_bg.png" COMP; + image: "../images/edit_all_page_create.png" COMP; +} + +collections +{ + group + { + name: GROUP_ALL_PAGES; + + parts { + part + { + name: "base"; + type: SPACER; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0;} + rel2 { relative: 1.0 1.0;} + } + } + part + { + name: "bg"; + type: SWALLOW; + description + { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; to:"base";} + rel2 { relative: 1.0 1.0; to:"base";} + } + } + part + { + name: PART_LAYOUT_CONTENT; + type: SWALLOW; //gengrid swallow + description + { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; to:"base";} + rel2 { relative: 1.0 1.0; to:"base";} + } + } + } + } + + group { + name: GROUP_GRID_ITEM; + + parts { + part { + name: "base"; + type: SPACER; + description { + state: "default" 0.0; + rel1 {relative: 0.0 0.0;} + rel2 {relative: 1.0 1.0;} + } + } + + part { + name: PART_GRID_ITEM_CONTENT; + type: SWALLOW; + description { + state: "default" 0.0; + rel1 {relative: 0.0 0.0; to: "base";} + rel2 {relative: 1.0 1.0; to: "base";} + } + } + } + } + + group + { + name: GROUP_THUMB; + parts + { + part + { + name: "base"; + type: SPACER; + description + { + state: "default" 0.0; + rel1 {relative: 0.0 0.0;} + rel2 {relative: 1.0 1.0;} + } + } + part + { + name: "bg"; + type: IMAGE; + description + { + state: "default" 0.0; + rel1 {relative: 0.0 0.0; to: PART_THUMB_CONTENT;} + rel2 {relative: 1.0 1.0; to: PART_THUMB_CONTENT;} + image { + normal: "../images/edit_all_page_bg.png"; + } + } + description + { + state: "hide" 0.0; + inherit: "default" 0.0; + visible: 0; + } + description + { + state: "reposition" 0.0; + inherit: "default"; + rel1 {relative: -0.05 -0.05;} + rel2 {relative: 1.05 1.05;} + visible: 1; + image + { + normal: "../images/edit_all_page_drag.png"; + } + } + } + part { + name: "add_bg"; + type: IMAGE; + description { + state: "default" 0.0; + rel1 {relative: 0.34 0.34; to: "bg";} + rel2 {relative: 0.67 0.67; to: "bg";} + visible: 0; + image { + normal : "../images/edit_all_page_create.png"; + } + } + description { + state: "visible" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + part + { + name: PART_THUMB_CONTENT; + type: SWALLOW; + description + { + state: "default" 0.0; + rel1 {relative: 0.0 0.0; to: "base";} + rel2 {relative: 1.0 1.0; to: "base";} + } + } + part { + name: "remove_button"; + type: IMAGE; + description { + state: "default" 0.0; + rel1{relative: BADGE_REL1_X BADGE_REL1_Y; to: "base";} + rel2{relative: BADGE_REL2_X BADGE_REL2_Y; to: "base";} + visible: 1; + aspect: 0.0 0.0; + aspect_preference: BOTH; + fixed: 1 1; + image { + normal: "../images/btn_delete_nor.png"; + } + } + description { + state: "pressed"; + inherit: "default" 0.0; + image { + normal: "../images/btn_delete_press.png"; + } + } + description { + state: "hidden" 0.0; + inherit: "default" 0.0; + color: 255 255 255 0; + visible: 0; + } + } + } + programs + { + program + { + name: "bg_hide"; + signal: SIGNAL_BG_HIDE; + source: "layout"; + action: STATE_SET "hide" 0.0; + target: "bg"; + } + program + { + name: "bg_reposition"; + signal: SIGNAL_BG_REPOSITON; + source: "layout"; + action: STATE_SET "reposition" 0.0; + target: "bg"; + transition: DECELERATE 0.2; + } + program + { + name: "bg_normal"; + signal: SIGNAL_BG_NORMAL; + source: "layout"; + action: STATE_SET "default" 0.0; + target: "bg"; + transition: DECELERATE 0.2; + } + program { + name: "thumbnail_clicked"; + signal: "mouse,clicked,1"; + source: "page_thumbnail"; + action: SIGNAL_EMIT SIGNAL_THUMBNAIL_CLICKED SIGNAL_SOURCE; + } + program { + name: "add_icon_show"; + signal: SIGNAL_ADD_ICON_SHOW; + source: "layout"; + action: STATE_SET "visible" 0.0; + target: "add_bg"; + } + program { + name: "remove_button_clicked"; + signal: "mouse,clicked,1"; + source: "remove_button"; + action: SIGNAL_EMIT SIGNAL_REMOVE_BUTTON_CLICKED SIGNAL_SOURCE; + } + program { + name: "remove_button_show"; + signal: SIGNAL_REMOVE_BUTTON_SHOW; + source: "layout"; + action: STATE_SET "default" 0.0; + target: "remove_button"; + transition: DECELERATE 0.20; + } + program { + name: "remove_button_hide"; + signal: SIGNAL_REMOVE_BUTTON_HIDE; + source: "layout"; + action: STATE_SET "hidden" 0.0; + target: "remove_button"; + transition: DECELERATE 0.20; + } + program { + name: "remove_button_hide_instant"; + signal: SIGNAL_REMOVE_BUTTON_HIDE_INSTANT; + source: "layout"; + action: STATE_SET "hidden" 0.0; + target: "remove_button"; + } + program { + name: "remove_button_mouse_down"; + signal: "mouse,down,1"; + source: "remove_button"; + action: STATE_SET "pressed" 0.0; + target: "remove_button"; + transition: DECELERATE 0.20; + } + program { + name: "remove_button_mouse_up"; + signal: "mouse,up,1"; + source: "remove_button"; + action: STATE_SET "default" 0.0; + target: "remove_button"; + transition: DECELERATE 0.20; + } + } + } +} + diff --git a/res/edje/page_edit_util.edc b/res/edje/page_edit_util.edc new file mode 100644 index 0000000..85c6821 --- /dev/null +++ b/res/edje/page_edit_util.edc @@ -0,0 +1,108 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.1 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define PAGE_RECT(part_name, row_def, col_def) \ +part { \ + name: "item_"part_name"_rect"; \ + type: RECT; \ + description { \ + state: "default" 0.0; \ + color: 0 0 0 0; \ + rel1 {relative: ((col_def+1)*ROW_SHIFT) ((row_def+1)*COL_SHIFT); to: "container"; offset: THUMBNAIL_OFFSET_X THUMBNAIL_OFFSET_Y;} \ + rel2 {relative: ((col_def+1)*ROW_SHIFT) ((row_def+1)*COL_SHIFT); to: "container"; offset: THUMBNAIL_OFFSET_X THUMBNAIL_OFFSET_Y;} \ + min: THUMBNAIL_WIDTH THUMBNAIL_HEIGHT; \ + max: THUMBNAIL_WIDTH THUMBNAIL_HEIGHT; \ + } \ +} \ + + +#define PAGE_SWALLOW(part_name, row_def, col_def, row_prev, col_prev, row_next, col_next) \ +part { \ + name: "item_"part_name"_swallow"; \ + type: SWALLOW; \ + scale: 1; \ + mouse_events: 1;\ + description { \ + state: "default" 0.0 ;\ + color: 0 0 0 0; \ + rel1 {relative: ((col_def+1)*ROW_SHIFT) ((row_def+1)*COL_SHIFT); to: "container"; offset: THUMBNAIL_OFFSET_X THUMBNAIL_OFFSET_Y;} \ + rel2 {relative: ((col_def+1)*ROW_SHIFT) ((row_def+1)*COL_SHIFT); to: "container"; offset: THUMBNAIL_OFFSET_X THUMBNAIL_OFFSET_Y;} \ + fixed: 1 1; \ + min: THUMBNAIL_WIDTH THUMBNAIL_HEIGHT; \ + max: THUMBNAIL_WIDTH THUMBNAIL_HEIGHT; \ + } \ + description { \ + state: "prev" 0.0 ;\ + color: 255 0 0 150; \ + rel1 {relative: ((col_prev+1)*ROW_SHIFT) ((row_prev+1)*COL_SHIFT); to: "container"; offset: THUMBNAIL_OFFSET_X THUMBNAIL_OFFSET_Y;} \ + rel2 {relative: ((col_prev+1)*ROW_SHIFT) ((row_prev+1)*COL_SHIFT); to: "container"; offset: THUMBNAIL_OFFSET_X THUMBNAIL_OFFSET_Y;} \ + fixed: 1 1; \ + } \ + description { \ + state: "next" 0.0 ;\ + color: 255 0 0 150; \ + rel1 {relative: ((col_next+1)*ROW_SHIFT) ((row_next+1)*COL_SHIFT); to: "container"; offset: THUMBNAIL_OFFSET_X THUMBNAIL_OFFSET_Y;} \ + rel2 {relative: ((col_next+1)*ROW_SHIFT) ((row_next+1)*COL_SHIFT); to: "container"; offset: THUMBNAIL_OFFSET_X THUMBNAIL_OFFSET_Y;} \ + fixed: 1 1; \ + } \ +} \ + +#define PAGE_PROGRAM(part_name) \ +program { \ + name: "page_grid_"part_name"_next"; \ + signal: "set_next"; \ + source: "item_"part_name"_swallow"; \ + action: STATE_SET "next" 0.0;\ + target: "item_"part_name"_swallow"; \ + transition: DECELERATE 0.20; \ + after: "page_grid_ani_done_next_"part_name; \ +} \ +program { \ + name: "page_grid_"part_name"_prev"; \ + signal: "set_prev"; \ + source: "item_"part_name"_swallow"; \ + action: STATE_SET "prev" 0.0;\ + target: "item_"part_name"_swallow"; \ + transition: DECELERATE 0.20; \ + after: "page_grid_ani_done_prev_"part_name; \ +} \ +program { \ + name: "page_grid_"part_name"_ani_"; \ + signal: "set_def"; \ + source: "item_"part_name"_swallow"; \ + action: STATE_SET "default" 0.0; \ + target: "item_"part_name"_swallow"; \ +} \ +program { \ + name: "page_grid_ani_done_prev_"part_name; \ + action: SIGNAL_EMIT "ani,done,left" "item_"part_name"_swallow"; \ +} \ +program { \ + name: "page_grid_ani_done_next_"part_name; \ + action: SIGNAL_EMIT "ani,done,right" "item_"part_name"_swallow"; \ +} \ +program { \ + name: "program_down_app_grid_"part_name; \ + source: "item_"part_name"_swallow";\ + signal: "mouse,down,1";\ + action: SIGNAL_EMIT "down,part" "item_"part_name"_swallow";\ +}\ +program { \ + name: "program_up_app_grid_"part_name; \ + source: "item_"part_name"_swallow";\ + signal: "mouse,up,1";\ + action: SIGNAL_EMIT "up,part" "item_"part_name"_swallow";\ +}\ \ No newline at end of file diff --git a/res/images/CMakeLists.txt b/res/images/CMakeLists.txt new file mode 100644 index 0000000..82aa7a7 --- /dev/null +++ b/res/images/CMakeLists.txt @@ -0,0 +1,48 @@ +INSTALL(FILES + app_icon_downloadable.png + app_press_117.png + btn_add_nor.png + btn_add_press.png + btn_delete_nor.png + btn_delete_press.png + btn_input_clear.png + default_bg.png + edit_all_page_add.png + edit_all_page_add_press.png + edit_all_page_bg.png + folder_appicon_bg_impossible.png + folder_appicon_bg.png + folder_appicon_bg_possible.png + folder_appicon_empty_bg.png + folder_popup_bg.png + home_button_bg.png + home_icon_home.png + home_icon_menu.png + home_icon_reorder.png + default.png + core_page_indicator_on.png + core_page_indicator_on_horizontal.png + edit_all_page_create.png + edit_page.png +DESTINATION + ${IMAGEDIR} +) + +INSTALL(FILES + livebox/preview_alarm.png + livebox/preview_contact_4x2.png + livebox/preview_dual_clock.png + livebox/preview_gallery.png + livebox/preview_music.png + livebox/preview_weather_4x2.png + livebox/preview_calendar.png + livebox/preview_contact_4x4.png + livebox/preview_FMradio.png + livebox/preview_internet_4x4.png + livebox/preview_singel_clock.png + livebox/preview_weather_4x4.png +DESTINATION + "${IMAGEDIR}/livebox" +) + +# End of a file \ No newline at end of file diff --git a/res/images/all_apps_icon_menu.png b/res/images/all_apps_icon_menu.png new file mode 100644 index 0000000000000000000000000000000000000000..a99d202dc0961a5a10a2bab5a1059c62bb2f225c GIT binary patch literal 1286 zcmbVMZD`zN9KTH*WiY9rx7ne_^n(gs-tLlK;;!@VlCx)*+Fftg_S2ds&$Xe=OOvO) z>rD{HrWWUzbru;b`!H5vgSq0wN^2(_hZET-8!{@=&8^T08(LTg9YuW7>vj83CK!_E z_5b_*-!stI@b;F?RhxZ2-eyWnvzq(r)#_ z2#zc*xnS6`yhd!gtARoxBlC()(gZ~shUeFcvULEqcJJOQdBS)s-Ub_M|xMW^b@f{ z+yM%-oU~8W{q>j;?ZyLT%2{?dkXl_!TLFTL55*)w+ULM-** z+~88}XdP4e^6{$`)rY952BKL1qkj=2CO&iz-ui6l(Ee}3&nyqt76-!1^w2*)w8}O-tPHW rE{+fX`i=0Bf8S#+dCrXmm;7zM<;+(%<~IH^?fsdOQiFIl*0%p&rb5Lo literal 0 HcmV?d00001 diff --git a/res/images/app_icon_checkbox_bg.png b/res/images/app_icon_checkbox_bg.png new file mode 100755 index 0000000000000000000000000000000000000000..f31b150851b55b3903078be0ebf7dc681ed031b5 GIT binary patch literal 288 zcmeAS@N?(olHy`uVBq!ia0vp^8X(NU1|)m_?Z^dEjKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgg~7JeQ+5q_CX(LkXEo-U3d5r^O2 z*vNY*fT!i*eZkoZM`ZGO<}FCzoubE@#KslCbuEEkC1J|qlg>94^xkRh{+)8V*I8)h z<}6p6dF&5ZavCE}C_iA02|3NHpkjJwMoxwM)uQ*ymih0vE4P5roU`$@rNJgSPxns} z84DWOq|k^RHUT#q-?wagFJqy?GVi~`RU;2?p z{|8~lFI}5Dfr64Ht`Q}{`DrEPiAAXljw$&`sS2LCiRr09sfj6-g(p*OfQl+ST^vIq zTHoH-DA*jp!*Wr0?q4&F31%8+RcfS#Ch_W|l{xn|iN~jIdpo}*OLnTt)FtwH+xk{X zzYF=lw>$Hv-0laHW~WyEdOg8m7G8LZ|3>EWeGzd6i_Y&-JU{mr!@M=(8}3v!*#X_a N;OXk;vd$@?2>{mRTMqyL literal 0 HcmV?d00001 diff --git a/res/images/app_icon_checkbox_on.png b/res/images/app_icon_checkbox_on.png new file mode 100755 index 0000000000000000000000000000000000000000..1ad477a1b5b1e3bd3fe14031e3d6af9201b504b1 GIT binary patch literal 1325 zcmbVMZA{!`9538N24i$tGMPqbI-{_8*H?Pi!g1?e@8F`x*l}~PM7Q4cIj)1YXIpj$ zAB3@F9?oQoF$_PL>DYosCEK{{gGLvkCL_K?M@WnsL!u^{m@JEl;e!i4Jvj6O*$11p z&-48I|NZ{&o$TrEtgCsn20@UzXqOa+Yoqg2SHX81Id>T@d+l(a-D{-noNNL_RE#9R zqMAGa;y_kLUR(t22;xesi9Wk8_N`1)c=B2nq7kG$kk87gL11G^Freyw{O(7$ za7uK2wFB4+a%VljYPqe5qUXFP#%)dG$*c-wq?h`ziw=)Z6!vsfQSRj z7&cR|9_f8$FwEV94LOR?8{v?t!lKASl93wLfNn=6KMucm6jc#;kz&{g9j3)F6J{vN zCrYHqu_P5_gFM&jD|2jxjc^o0Mp%gqN+F60vpnUcLkz|8A|v|3L9UFA>Xt3*DNwen zLc1H-&;zkT$ON)&m?^XXMT+T==h zT&r$AvefX1>)x%k>XmI@N7^Y-Ik z&K7S>y9(a7`-P^$8{aO+m*OvAKb=pj0rtDS8E~CMFGc2yJ1;dVJDbo07vy(Y^myn7 z`uecB{r5A}FXOB3MDJ5`D+?1x##cLDyE-=Rn`-!&Jll4R{Oa>5?3-(iXrS}XpRU6F z$-0(?GusOnXZkQ=$IIHy@E6Gr7CXW zIrfV~!CrTlr=c*0FZx|c%`_`LlX!9B{(ki0!QJ&cetakyHs`U9MTtFkVF6%MSDv`L zJB}i;4{on)Lu(Ho`wgABy{iyNz9%;?yee_V)zf`-h5Cwn$4|1+hRz?BOBt-F+=09q V1myG`{-*N-i-xIjo1vSb;uh7{S# zo+8;5vgTM*I3(YwQ{VaHeCLnvz25hJmiPYMzx%nL`+l$Idaq-xP6-Q23373938PJs zI8N)c^8olclEzzD&1nuYPy_~^>dNqQ@+NW_yHGC>foQVRMIw&q|#}|EYRJ>K=zELCD@XN zAiBAm26_|mfmSxofga8}F0w|3Kz)B*jsY@};RN(2ds67S{syw&?do#+JJTRp;CB^< zhk@)5rwEom1Zt|Ot2%=r5FiYu2GP)j!5}AqP%s1v0&{MdDnvt96Q&E*0{(r; za@f3GTy=3slfSt*BLi7C27{&x0{Qv*srjj^QN1sMAUZlaJ2s$DRgQ)#J%GY+@>iwM zkNvcOB+{L|-DwPWDh0S>(dh!!hhZSg@$|27;)8L1gmI zy1r}E893tqy78~tbejMg5riYssXpG$oc(Y;_7lvB-G3A9C~~~f#dy1OHpR&kNpetfhs3Ku{Vw8d};q2px5p4hjN?z~DczXbPR-L~$nm|;V zy=|ye&z~89b)zzu6d($4n$SS^z1?e0r-G4ZC7f#2h+>;5nN z>JTj$6sfJDW&D4w`v=zL{}VG1#~IL0a{MD%eok>RaHsn#^*MuI#Y3cUD#n{r8rrOf zeOz37I?+gD8~?$%6d{^T&%x%};6>L~Jx{p5+~o(x0TO6LSs0+=1v}HKB(j@rBftcr zB4XIO70SfO%zkAktc10%(}w#1GOC(K^Qb7G{n*i~e=M28QoMukn3zA5DKE~C%X6{|c9o}{!_r%`-IBV&v-Eb6 zng4mly`R2!7JG)<7OJ^lSiT^?OVK`u*8*lCZee?(4y72+BN88`DWhXB3weuqK;kz2^U*t= zY1>`;aO?5=F#w8%mDQ_b>aH&DU>7vEestmj*eCgKM6_(Y~(Kz+Ot7UmisA3r&CJyN8nJn8WE`cvG#x4%8= zDJe*6>*}Y>7kTxwEtHcz9dmc>iP_>ale~IWPEO83MNzTe6)f2lSe3nGCgw7Ax~^|B zI`l=lr^C|`uj+T6*Yw_N1I(`NnUX&=dj0;bh{WZ+=ZXr7ifRpmR_B_PRaBx|o<#Fx z8C$p)mwx6g%gt5P($^mz4X7zi7dtl;Eb|GZwYt0d0q;e*s2_i>=)Mhsuzp=D?W|DVsKnyb(N2E&M2uYX zy9`G0XZhi6D;cKmhRJ=E)^O+MTjXQOEwCnWpiSR}hMDdhOzoiq2Q&w_qyu`RhF;hG zIg|blwwab~`u=SXnLf4MG(DZ-@T96m{9boW1gN>v(}i!89X>of9FIn$l@U%X&50P3UEB#k z^OuVv+qy!Us;)6z%gf8LXA12DM1t}|Fq)320vpBs88e^C9j5P%f7~|PufMgMN5L;W zn&cV!I;P`hr+|&;@~8g({>l>PX8EW0^#j>5R`%{vEa9+|W!nvw+J2cR#!b)T$(I-3 zFMVVmO-xM0xN9VduEpA&QWF^}#H4ME(w@v144A=U=WllDy)B-Ym{3|!DAe++zusoj z>O4}6G^2dPezbIRdwj$DWOB}(?`oY136fpIi{{Rn+H;rH<7;9?2{mD%j^>mbH;-tN z_76z6Np7A1ww}(nEimi)^NVaQ-+^eJHd^J=^KZOFlEcEn_PFTPOk^QMFg;n>+1dW7 z+Vt`OE{DY>pW3)r_8tqd?VkIC1xyB1rc*)~)R@isr?ydauqYW001I%`jtos0TeG z_GOm^76|$lC5^3o{o*QgV(SkUfbTXx4|c@$a%IbVK2TXowM~a&rIwMc4S z@-QO3DIrWcSkN>@8YFX+1T)xt%n2t@bc~Jw?FBR5ADSv9B!p8j=SYF+0p7=jQ2IjjT{N zS;U^zN~bYry^WrDF5H$Q!c(*Nyt#5M`#4~g6r7I{QO&1>$A=h%M%Uc}ml*S!54qS~ z!jy9A@rHcu;wKxHg3VmmHGGbhgJH-wX8fkJ&G|5~>lqT+773ryVdLHi3ztP??_5NVPeCG2}KcgyPxxFV>lK}Tvig7e{6R(Q8 zh_T;oE{9$jfBq_BnCcle#WLcaP|&v(=3keUL?tvEg86n^rRv*#>pe>iZo(fl!a7*f z-n~lEJKx&gE_S*Xzaro8OeQ7=)MfUE{F~5_1K7x2U9-1u)jc{Qef81lXsiB-4(N5G zn&r`#Ud8^a{#_-Rr*8W$4n1D}Bi?HO#dAKH4Q0m^6s8pi2OHO!+N|m9im$yq_jlXb z*_}UOUkTQMRruAA8r|E4&SL6nRy6NGB_4_wYxL-ik@n`=tCB&RV|HG}lr9TwrGda{ zJf0_LZ9z5UQ>%i+has~nm5lLe{FZ-SJ}%dmG;(QkK1W1ayAyYQ;l&d${ce8yOwp z97Xau$21n}?%n&wX{v^E&KTkSdHEmQ$_>Pu2g>=cjNN_Y+JOVQUF4duj3biGB{X~q z>Cc%SJjV$+VKZ1&NjP()16=_;nG_-D+!7tCl}ovTGX}un}B&`LgVhfq@|e(HMar6!tv=62vbu)ZV&0= z2ES}pMFs4WiP>*+HOWImL$$A3TU%d*=I*ByO#1Sd;$C1Q0C}gfaJ-gALWgeMXi(~O z(B4YS>-#gdCBMX@x9TY&tY@I7=d`thL$K@0RL3?X(c&|052`Ht^0#jw#9{v2bNUGj z=&mPs8pxNgkdl2vUlzI?yitBOeDKWn0Y@%@KPq$^6ShQl{u!WAR>(rQW7z)y9&4b; literal 0 HcmV?d00001 diff --git a/res/images/app_press_117.png b/res/images/app_press_117.png new file mode 100644 index 0000000000000000000000000000000000000000..5acae9d0ff39341450f2e0959cc91e8984ce0f35 GIT binary patch literal 3104 zcmaJ@c|4SB8y?C|B1JkF)2_^dp&9EiwrZGWXe46HyqFm?qnWYqrAQ%J(n!{_g;7+< zlIGykM|7T!B#<5T^0laDcIX# z38Fb*^_7+sef`%~+!almdDbpGBHNo6MCJe>43+H#fbE%NAAkUmsUgQZ0TU2t4TR?8 z!gIkLL{r#ID0vkF4QBd_*dUOJd9Xj3!T@++FTjV!GKI|4H$lKOswsqo#KCd?R)8qr9Dx8E8bT2UNJB%!Ua%e@hq5_7Fa!#PTGi0g(-k3fxgjhbIars)-TFfT3vekM znm>=mW`S1~$zJRLo+(6>=|5Ls`u~(=ale;IR4`aD*&l|0!dI{K1Bk=@e<+jr6V2rj zfPeG-pTbB@2#t${Lxk%fXriaoY-u?A63NrvUzN-FWVn%MKlEO zBGFh>b`W>>H#`o9wr6p9WEKUm$C^S!3Q!u2iiYn)?L&#`i!n07A`sRFC~E}V#?lfa z8hTh!;eT+kY)SwVVDWx%ssD2If5~070@Gg<84GY|fdJKp!)AiNT^UXLbuRE<>V4-@ zf1L~Bmt2@A8Q5xL|EtkIjzsQRUH-JKX!Fzf088X{j>y*6KZgJykaU_o7UL8woX%F@ z_8(mTyHV{ni=$PpWiLK`4NP{`J@w(jd6VDf#=H|%#J7z@r+Y`#%DnD)d|ZHrDSh6G z0ouH%-msIzsh1;oeDOPf}PNbbURyxm`M~A!kg)=-LW!<&hvKv0as| z8j4~v=biELMrCeu0>MQ!hSrrx(##%Zbzky2BTDQWwP(I@A5|2(F<{MT75J;Hs^*3L zAehS3_)?WH@aE>*YFob?K}tlT7%pBWG{B}_jq9H+B;fW!bi?YWeSV)6QKvHT7i-AFbQ$L;|h2wcvbR)?i3&R*j%Ufg#IS)Kf#%< zpElCvd#WvF#`ROzMNml-C>5o!b8iF}w89jTvB`Ji0-wIPPf)bb)ayZvbXi~@mS<51 z#PA=pa>#V6I!zfY9;tljLn%(cwA28DLM^aa@kI-Ktj&EHo3h47)$_ck@t&`*UEsSF z*hSqRLge50ZPH*6L|!KO`u20jLZ*JRhD`PGp{|*y%^7=74_{JMDTmCvF|S(I$uu1uN14%Evrr!QFzcU+C!IE{S{>N1P~ad#dVg3g#JzZ{%I4sx zl!UMtB4~{N=v3DMdKJCorjY)Oy#1})?LheN3XWiU# zxkrbIyA4g^4Qz0g=9mGGc4?V~O|