apply FSL(Flora Software License)
authorKim Kibum <kb0929.kim@samsung.com>
Fri, 8 Jun 2012 05:54:14 +0000 (14:54 +0900)
committerKim Kibum <kb0929.kim@samsung.com>
Fri, 8 Jun 2012 05:54:14 +0000 (14:54 +0900)
128 files changed:
AUTHORS [new file with mode: 0644]
CMakeLists.txt [new file with mode: 0644]
LICENSE [new file with mode: 0755]
data/batt_full_icon.png [new file with mode: 0644]
data/lowbatt-popup.ini [new file with mode: 0644]
data/lowmem-popup.ini [new file with mode: 0644]
data/org.tizen.lowbat-syspopup.desktop.in [new file with mode: 0644]
data/org.tizen.lowbat-syspopup.png [new file with mode: 0644]
data/org.tizen.lowmem-syspopup.desktop.in [new file with mode: 0644]
data/org.tizen.lowmem-syspopup.png [new file with mode: 0644]
data/org.tizen.poweroff-syspopup.desktop.in [new file with mode: 0644]
data/org.tizen.poweroff-syspopup.png [new file with mode: 0644]
data/poweroff-popup.ini [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/debhelper.log [new file with mode: 0644]
debian/org.tizen.lowbat-syspopup.install.in [new file with mode: 0644]
debian/org.tizen.lowmem-syspopup.install.in [new file with mode: 0644]
debian/org.tizen.poweroff-syspopup.install.in [new file with mode: 0644]
debian/rules [new file with mode: 0755]
edcs/lowbatt.edc [new file with mode: 0644]
edcs/lowmem.edc [new file with mode: 0644]
edcs/poweroff.edc [new file with mode: 0644]
images/01_cont_popup_bottom_center.png [new file with mode: 0644]
images/01_cont_popup_bottom_left.png [new file with mode: 0644]
images/01_cont_popup_bottom_right.png [new file with mode: 0644]
images/01_cont_popup_center_bottom.png [new file with mode: 0644]
images/01_cont_popup_center_top.png [new file with mode: 0644]
images/01_cont_popup_icon_bg.png [new file with mode: 0644]
images/01_cont_popup_left_bottom.png [new file with mode: 0644]
images/01_cont_popup_left_center.png [new file with mode: 0644]
images/01_cont_popup_left_mid.png [new file with mode: 0644]
images/01_cont_popup_left_top.png [new file with mode: 0644]
images/01_cont_popup_right_bottom.png [new file with mode: 0644]
images/01_cont_popup_right_center.png [new file with mode: 0644]
images/01_cont_popup_right_mid.png [new file with mode: 0644]
images/01_cont_popup_right_top.png [new file with mode: 0644]
images/01_cont_popup_tail_bottom.png [new file with mode: 0644]
images/01_cont_popup_tail_left.png [new file with mode: 0644]
images/01_cont_popup_tail_right.png [new file with mode: 0644]
images/01_cont_popup_tail_top.png [new file with mode: 0644]
images/01_cont_popup_top_center.png [new file with mode: 0644]
images/01_cont_popup_top_left.png [new file with mode: 0644]
images/01_cont_popup_top_right.png [new file with mode: 0644]
images/01_popup_bg.png [new file with mode: 0644]
images/01_popup_bg_bottom.png [new file with mode: 0644]
images/01_popup_bg_middle.png [new file with mode: 0644]
images/01_popup_bg_top.png [new file with mode: 0644]
images/01_popup_button_gray.png [new file with mode: 0644]
images/01_popup_button_gray_c.png [new file with mode: 0644]
images/01_popup_button_gray_dim_c.png [new file with mode: 0644]
images/01_popup_button_gray_dim_l.png [new file with mode: 0644]
images/01_popup_button_gray_dim_r.png [new file with mode: 0644]
images/01_popup_button_gray_l.png [new file with mode: 0644]
images/01_popup_button_gray_press_c.png [new file with mode: 0644]
images/01_popup_button_gray_press_l.png [new file with mode: 0644]
images/01_popup_button_gray_press_r.png [new file with mode: 0644]
images/01_popup_button_gray_r.png [new file with mode: 0644]
images/01_popup_progress_loading_blue_02_bg.png [new file with mode: 0644]
images/01_popup_progress_loading_blue_91_bg.png [new file with mode: 0644]
images/01_popup_progress_loading_orange_02_bg.png [new file with mode: 0644]
images/01_popup_progress_loading_orange_91_bg.png [new file with mode: 0644]
images/01_popup_scrollbar_bg_bottom.png [new file with mode: 0644]
images/01_popup_scrollbar_bg_middle.png [new file with mode: 0644]
images/01_popup_scrollbar_bg_top.png [new file with mode: 0644]
images/PUT_IMAGES_HERE [new file with mode: 0644]
lowbatt-popup/CMakeLists.txt [new file with mode: 0644]
lowbatt-popup/po_lowbatt/CMakeLists.txt [new file with mode: 0644]
lowbatt-popup/po_lowbatt/de_DE.po [new file with mode: 0755]
lowbatt-popup/po_lowbatt/el_GR.po [new file with mode: 0755]
lowbatt-popup/po_lowbatt/en.po [new file with mode: 0755]
lowbatt-popup/po_lowbatt/es_ES.po [new file with mode: 0755]
lowbatt-popup/po_lowbatt/fr_FR.po [new file with mode: 0755]
lowbatt-popup/po_lowbatt/it_IT.po [new file with mode: 0755]
lowbatt-popup/po_lowbatt/ja_JP.po [new file with mode: 0755]
lowbatt-popup/po_lowbatt/ko_KR.po [new file with mode: 0755]
lowbatt-popup/po_lowbatt/nl_NL.po [new file with mode: 0755]
lowbatt-popup/po_lowbatt/pt_PT.po [new file with mode: 0755]
lowbatt-popup/po_lowbatt/ru_RU.po [new file with mode: 0755]
lowbatt-popup/po_lowbatt/tr_TR.po [new file with mode: 0755]
lowbatt-popup/po_lowbatt/zh_CN.po [new file with mode: 0755]
lowbatt-popup/po_lowbatt/zh_HK.po [new file with mode: 0755]
lowbatt-popup/po_lowbatt/zh_TW.po [new file with mode: 0755]
lowbatt-popup/src/lowbatt.c [new file with mode: 0644]
lowbatt-popup/src/lowbatt.h [new file with mode: 0644]
lowmem-popup/CMakeLists.txt [new file with mode: 0644]
lowmem-popup/po_lowmem/CMakeLists.txt [new file with mode: 0644]
lowmem-popup/po_lowmem/de_DE.po [new file with mode: 0755]
lowmem-popup/po_lowmem/el_GR.po [new file with mode: 0755]
lowmem-popup/po_lowmem/en.po [new file with mode: 0755]
lowmem-popup/po_lowmem/es_ES.po [new file with mode: 0755]
lowmem-popup/po_lowmem/fr_FR.po [new file with mode: 0755]
lowmem-popup/po_lowmem/it_IT.po [new file with mode: 0755]
lowmem-popup/po_lowmem/ja_JP.po [new file with mode: 0755]
lowmem-popup/po_lowmem/ko_KR.po [new file with mode: 0755]
lowmem-popup/po_lowmem/nl_NL.po [new file with mode: 0755]
lowmem-popup/po_lowmem/pt_PT.po [new file with mode: 0755]
lowmem-popup/po_lowmem/ru_RU.po [new file with mode: 0755]
lowmem-popup/po_lowmem/tr_TR.po [new file with mode: 0755]
lowmem-popup/po_lowmem/zh_CN.po [new file with mode: 0755]
lowmem-popup/po_lowmem/zh_HK.po [new file with mode: 0755]
lowmem-popup/po_lowmem/zh_TW.po [new file with mode: 0755]
lowmem-popup/src/lowmem.c [new file with mode: 0644]
lowmem-popup/src/lowmem.h [new file with mode: 0644]
packaging/system-popup.spec [new file with mode: 0644]
poweroff-popup/CMakeLists.txt [new file with mode: 0644]
poweroff-popup/po_poweroff/CMakeLists.txt [new file with mode: 0644]
poweroff-popup/po_poweroff/de_DE.po [new file with mode: 0755]
poweroff-popup/po_poweroff/el_GR.po [new file with mode: 0755]
poweroff-popup/po_poweroff/en.po [new file with mode: 0755]
poweroff-popup/po_poweroff/es_ES.po [new file with mode: 0755]
poweroff-popup/po_poweroff/fr_FR.po [new file with mode: 0755]
poweroff-popup/po_poweroff/it_IT.po [new file with mode: 0755]
poweroff-popup/po_poweroff/ja_JP.po [new file with mode: 0755]
poweroff-popup/po_poweroff/ko_KR.po [new file with mode: 0755]
poweroff-popup/po_poweroff/nl_NL.po [new file with mode: 0755]
poweroff-popup/po_poweroff/pt_PT.po [new file with mode: 0755]
poweroff-popup/po_poweroff/ru_RU.po [new file with mode: 0755]
poweroff-popup/po_poweroff/tr_TR.po [new file with mode: 0755]
poweroff-popup/po_poweroff/zh_CN.po [new file with mode: 0755]
poweroff-popup/po_poweroff/zh_HK.po [new file with mode: 0755]
poweroff-popup/po_poweroff/zh_TW.po [new file with mode: 0755]
poweroff-popup/src/poweroff.c [new file with mode: 0755]
poweroff-popup/src/poweroff.h [new file with mode: 0644]
sound/02_Warning.wav [new file with mode: 0755]
sound/09_Low_Battery.wav [new file with mode: 0755]

diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..67e6bd9
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,2 @@
+Jinkun Jang <jinkun.jang@samsung.com>\r
+DongGi Jang <dg0402.jang@samsung.com>\r
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..6ddd50b
--- /dev/null
@@ -0,0 +1,15 @@
+####### System-popup #############
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(system-popup C)
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(EXEC_PREFIX "\${prefix}")
+SET(LIBDIR "\${prefix}/lib")
+SET(INCLUDEDIR "\${prefix}/include")
+
+# SUbmodules
+ADD_SUBDIRECTORY(poweroff-popup)
+ADD_SUBDIRECTORY(lowbatt-popup)
+ADD_SUBDIRECTORY(lowmem-popup)
+
+############## END ##############
diff --git a/LICENSE b/LICENSE
new file mode 100755 (executable)
index 0000000..7ccb5b5
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,75 @@
+Flora License
+
+Version 1.0, May, 2012
+
+http://www.tizenopensource.org/license
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+"Tizen Certified Platform" shall mean a software platform that complies with the standards set forth in the Compatibility Definition Document and passes the Compatibility Test Suite as defined from time to time by the Tizen Technical Steering Group and certified by the Tizen Association or its designated agent.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work solely as incorporated into a Tizen Certified Platform, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work solely as incorporated into a Tizen Certified Platform to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof pursuant to the copyright license above, in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+  1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+  2. You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+  3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+  4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Flora License to your work
+
+To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Flora License, Version 1.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.tizenopensource.org/license
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/data/batt_full_icon.png b/data/batt_full_icon.png
new file mode 100644 (file)
index 0000000..4245ccc
Binary files /dev/null and b/data/batt_full_icon.png differ
diff --git a/data/lowbatt-popup.ini b/data/lowbatt-popup.ini
new file mode 100644 (file)
index 0000000..5abbace
--- /dev/null
@@ -0,0 +1,2 @@
+[ProcessSetting]
+BG_SCHEDULE=true
diff --git a/data/lowmem-popup.ini b/data/lowmem-popup.ini
new file mode 100644 (file)
index 0000000..5abbace
--- /dev/null
@@ -0,0 +1,2 @@
+[ProcessSetting]
+BG_SCHEDULE=true
diff --git a/data/org.tizen.lowbat-syspopup.desktop.in b/data/org.tizen.lowbat-syspopup.desktop.in
new file mode 100644 (file)
index 0000000..4ddde12
--- /dev/null
@@ -0,0 +1,9 @@
+Name=Low battery system popup
+Type=Application
+Exec=/opt/apps/org.tizen.lowbat-syspopup/bin/lowbatt-popup
+Nodisplay=True
+Icon=org.tizen.lowbat-syspopup.png
+Network={True/False}
+Comment=lowbatt
+X-TIZEN-TaskManage=False
+X-TIZEN-Removable=False
diff --git a/data/org.tizen.lowbat-syspopup.png b/data/org.tizen.lowbat-syspopup.png
new file mode 100644 (file)
index 0000000..ef74fd1
Binary files /dev/null and b/data/org.tizen.lowbat-syspopup.png differ
diff --git a/data/org.tizen.lowmem-syspopup.desktop.in b/data/org.tizen.lowmem-syspopup.desktop.in
new file mode 100644 (file)
index 0000000..7e87d57
--- /dev/null
@@ -0,0 +1,9 @@
+Name=Low memory system popup
+Type=Application
+Exec=/opt/apps/org.tizen.lowmem-syspopup/bin/lowmem-popup
+Nodisplay=True
+Icon=org.tizen.lowmem-syspopup.png
+Network={True/False}
+Comment=lowmem
+X-TIZEN-TaskManage=False
+X-TIZEN-Removable=False
diff --git a/data/org.tizen.lowmem-syspopup.png b/data/org.tizen.lowmem-syspopup.png
new file mode 100644 (file)
index 0000000..ef74fd1
Binary files /dev/null and b/data/org.tizen.lowmem-syspopup.png differ
diff --git a/data/org.tizen.poweroff-syspopup.desktop.in b/data/org.tizen.poweroff-syspopup.desktop.in
new file mode 100644 (file)
index 0000000..6fd2521
--- /dev/null
@@ -0,0 +1,9 @@
+Name=Power off system popup
+Type=Application
+Exec=/opt/apps/org.tizen.poweroff-syspopup/bin/poweroff-popup
+Nodisplay=True
+Icon=org.tizen.poweroff-syspopup.png
+Network={True/False}
+Comment=poweroff
+X-TIZEN-TaskManage=False
+X-TIZEN-Removable=False
diff --git a/data/org.tizen.poweroff-syspopup.png b/data/org.tizen.poweroff-syspopup.png
new file mode 100644 (file)
index 0000000..ef74fd1
Binary files /dev/null and b/data/org.tizen.poweroff-syspopup.png differ
diff --git a/data/poweroff-popup.ini b/data/poweroff-popup.ini
new file mode 100644 (file)
index 0000000..5abbace
--- /dev/null
@@ -0,0 +1,2 @@
+[ProcessSetting]
+BG_SCHEDULE=true
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..aff60c3
--- /dev/null
@@ -0,0 +1,7 @@
+system-popup (0.1.7-67) unstable; urgency=low
+
+  * modify for bug for lowmem and lowbat popup
+  * Git: slp/pkgs/s/system-popup
+  * Tag: system-popup_0.1.7-67
+
+ -- Jinkun Jang <jinkun.jang@samsung.com>  Mon, 09 Apr 2012 14:50:31 +0900
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..c983102
--- /dev/null
@@ -0,0 +1,28 @@
+Source:system-popup
+Section: main
+Priority: extra
+Maintainer: Jonghoon Han <jonghoon.han@samsung.com> Jinkun Jang <jinkun.jang@samsung.com> Juhyun Kim <jh8212.kim> DongGi Jang <dg0402.jang@samsung.com> TAESOO JUN <steve.jun@samsung.com>
+Uploaders: Jinkun Jang <jinkun.jang@samsung.com>
+Build-Depends: debhelper (>=5),libevas-dev,libecore-dev,libethumb-dev,libelm-dev,libefreet-dev,        libslp-sysman-dev,libslp-sysman-dev,libslp-sensor-dev,libappcore-efl-dev,libdevman-dev,libmm-sound-dev, libslp-utilx-dev, syspopup-dev, libslp-pm-dev, libnotification-dev,libslp-setting-dev
+Standards-Version: 0.1.0 
+
+Package: org.tizen.poweroff-syspopup
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Power off popup application
+
+Package: org.tizen.lowmem-syspopup
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Low memory popup application
+
+Package: org.tizen.lowbat-syspopup
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Low battery popup application
+
+Package: system-popup-dbg
+Section: debug
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, org.tizen.poweroff-syspopup (= ${Source-Version}), org.tizen.lowmem-syspopup (= ${Source-Version}), org.tizen.lowbat-syspopup (= ${Source-Version})
+Description: System popup application (unstripped)
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..8d1c8b6
--- /dev/null
@@ -0,0 +1 @@
diff --git a/debian/debhelper.log b/debian/debhelper.log
new file mode 100644 (file)
index 0000000..4bf2059
--- /dev/null
@@ -0,0 +1,4 @@
+dh_installdirs
+dh_installchangelogs
+dh_installdocs
+dh_installexamples
diff --git a/debian/org.tizen.lowbat-syspopup.install.in b/debian/org.tizen.lowbat-syspopup.install.in
new file mode 100644 (file)
index 0000000..f25fa4d
--- /dev/null
@@ -0,0 +1,21 @@
+/opt/apps/org.tizen.lowbat-syspopup/bin/lowbatt-popup
+/opt/apps/org.tizen.lowbat-syspopup/res/keysound/09_Low_Battery.wav
+/opt/apps/org.tizen.lowbat-syspopup/res/edje/lowbatt/lowbatt.edj
+/opt/share/applications/org.tizen.lowbat-syspopup.desktop
+/opt/share/process-info/lowbatt-popup.ini
+/opt/apps/org.tizen.lowbat-syspopup/res/locale/de_DE/LC_MESSAGES/lowbatt-popup.mo
+/opt/apps/org.tizen.lowbat-syspopup/res/locale/el_GR/LC_MESSAGES/lowbatt-popup.mo  
+/opt/apps/org.tizen.lowbat-syspopup/res/locale/en/LC_MESSAGES/lowbatt-popup.mo  
+/opt/apps/org.tizen.lowbat-syspopup/res/locale/es_ES/LC_MESSAGES/lowbatt-popup.mo  
+/opt/apps/org.tizen.lowbat-syspopup/res/locale/fr_FR/LC_MESSAGES/lowbatt-popup.mo  
+/opt/apps/org.tizen.lowbat-syspopup/res/locale/it_IT/LC_MESSAGES/lowbatt-popup.mo  
+/opt/apps/org.tizen.lowbat-syspopup/res/locale/ja_JP/LC_MESSAGES/lowbatt-popup.mo  
+/opt/apps/org.tizen.lowbat-syspopup/res/locale/ko_KR/LC_MESSAGES/lowbatt-popup.mo  
+/opt/apps/org.tizen.lowbat-syspopup/res/locale/nl_NL/LC_MESSAGES/lowbatt-popup.mo  
+/opt/apps/org.tizen.lowbat-syspopup/res/locale/pt_PT/LC_MESSAGES/lowbatt-popup.mo  
+/opt/apps/org.tizen.lowbat-syspopup/res/locale/ru_RU/LC_MESSAGES/lowbatt-popup.mo  
+/opt/apps/org.tizen.lowbat-syspopup/res/locale/tr_TR/LC_MESSAGES/lowbatt-popup.mo  
+/opt/apps/org.tizen.lowbat-syspopup/res/locale/zh_CN/LC_MESSAGES/lowbatt-popup.mo  
+/opt/apps/org.tizen.lowbat-syspopup/res/locale/zh_HK/LC_MESSAGES/lowbatt-popup.mo  
+/opt/apps/org.tizen.lowbat-syspopup/res/locale/zh_TW/LC_MESSAGES/lowbatt-popup.mo
+/opt/apps/org.tizen.lowbat-syspopup/res/icons/batt_full_icon.png
diff --git a/debian/org.tizen.lowmem-syspopup.install.in b/debian/org.tizen.lowmem-syspopup.install.in
new file mode 100644 (file)
index 0000000..2f297d0
--- /dev/null
@@ -0,0 +1,21 @@
+/opt/apps/org.tizen.lowmem-syspopup/bin/lowmem-popup
+/opt/apps/org.tizen.lowmem-syspopup/res/keysound/02_Warning.wav
+/opt/apps/org.tizen.lowmem-syspopup/res/edje/lowmem/lowmem.edj
+/opt/share/applications/org.tizen.lowmem-syspopup.desktop
+/opt/share/process-info/lowmem-popup.ini
+/opt/apps/org.tizen.lowmem-syspopup/res/locale/de_DE/LC_MESSAGES/lowmem-popup.mo
+/opt/apps/org.tizen.lowmem-syspopup/res/locale/el_GR/LC_MESSAGES/lowmem-popup.mo  
+/opt/apps/org.tizen.lowmem-syspopup/res/locale/en/LC_MESSAGES/lowmem-popup.mo  
+/opt/apps/org.tizen.lowmem-syspopup/res/locale/es_ES/LC_MESSAGES/lowmem-popup.mo  
+/opt/apps/org.tizen.lowmem-syspopup/res/locale/fr_FR/LC_MESSAGES/lowmem-popup.mo  
+/opt/apps/org.tizen.lowmem-syspopup/res/locale/it_IT/LC_MESSAGES/lowmem-popup.mo  
+/opt/apps/org.tizen.lowmem-syspopup/res/locale/ja_JP/LC_MESSAGES/lowmem-popup.mo  
+/opt/apps/org.tizen.lowmem-syspopup/res/locale/ko_KR/LC_MESSAGES/lowmem-popup.mo  
+/opt/apps/org.tizen.lowmem-syspopup/res/locale/nl_NL/LC_MESSAGES/lowmem-popup.mo  
+/opt/apps/org.tizen.lowmem-syspopup/res/locale/pt_PT/LC_MESSAGES/lowmem-popup.mo  
+/opt/apps/org.tizen.lowmem-syspopup/res/locale/ru_RU/LC_MESSAGES/lowmem-popup.mo  
+/opt/apps/org.tizen.lowmem-syspopup/res/locale/tr_TR/LC_MESSAGES/lowmem-popup.mo  
+/opt/apps/org.tizen.lowmem-syspopup/res/locale/zh_CN/LC_MESSAGES/lowmem-popup.mo  
+/opt/apps/org.tizen.lowmem-syspopup/res/locale/zh_HK/LC_MESSAGES/lowmem-popup.mo  
+/opt/apps/org.tizen.lowmem-syspopup/res/locale/zh_TW/LC_MESSAGES/lowmem-popup.mo
+
diff --git a/debian/org.tizen.poweroff-syspopup.install.in b/debian/org.tizen.poweroff-syspopup.install.in
new file mode 100644 (file)
index 0000000..c81e23a
--- /dev/null
@@ -0,0 +1,20 @@
+/opt/apps/org.tizen.poweroff-syspopup/bin/poweroff-popup
+/opt/apps/org.tizen.poweroff-syspopup/res/edje/poweroff/poweroff.edj
+/opt/share/applications/org.tizen.poweroff-syspopup.desktop
+/opt/share/process-info/poweroff-popup.ini
+/opt/apps/org.tizen.poweroff-syspopup/res/locale/de_DE/LC_MESSAGES/poweroff-popup.mo
+/opt/apps/org.tizen.poweroff-syspopup/res/locale/el_GR/LC_MESSAGES/poweroff-popup.mo  
+/opt/apps/org.tizen.poweroff-syspopup/res/locale/en/LC_MESSAGES/poweroff-popup.mo  
+/opt/apps/org.tizen.poweroff-syspopup/res/locale/es_ES/LC_MESSAGES/poweroff-popup.mo  
+/opt/apps/org.tizen.poweroff-syspopup/res/locale/fr_FR/LC_MESSAGES/poweroff-popup.mo  
+/opt/apps/org.tizen.poweroff-syspopup/res/locale/it_IT/LC_MESSAGES/poweroff-popup.mo  
+/opt/apps/org.tizen.poweroff-syspopup/res/locale/ja_JP/LC_MESSAGES/poweroff-popup.mo  
+/opt/apps/org.tizen.poweroff-syspopup/res/locale/ko_KR/LC_MESSAGES/poweroff-popup.mo  
+/opt/apps/org.tizen.poweroff-syspopup/res/locale/nl_NL/LC_MESSAGES/poweroff-popup.mo  
+/opt/apps/org.tizen.poweroff-syspopup/res/locale/pt_PT/LC_MESSAGES/poweroff-popup.mo  
+/opt/apps/org.tizen.poweroff-syspopup/res/locale/ru_RU/LC_MESSAGES/poweroff-popup.mo  
+/opt/apps/org.tizen.poweroff-syspopup/res/locale/tr_TR/LC_MESSAGES/poweroff-popup.mo  
+/opt/apps/org.tizen.poweroff-syspopup/res/locale/zh_CN/LC_MESSAGES/poweroff-popup.mo  
+/opt/apps/org.tizen.poweroff-syspopup/res/locale/zh_HK/LC_MESSAGES/poweroff-popup.mo  
+/opt/apps/org.tizen.poweroff-syspopup/res/locale/zh_TW/LC_MESSAGES/poweroff-popup.mo
+
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..be23e44
--- /dev/null
@@ -0,0 +1,143 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+CFLAGS ?= -Wall -g
+CXXFLAGS ?=  -Wall -g
+LDFLAGS ?= --Wl,--rpath=$(PREFIX)/lib --Wl,--as-needed
+PREFIX ?= /usr
+DATADIR ?= /opt
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -O0
+       CXXFLAGS += -O0
+else
+       CFLAGS += -O2
+       CXXFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp:
+       dh_testdir
+       # Add here commands to configure the package.
+       CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake . -DCMAKE_INSTALL_PREFIX=$(PREFIX)
+
+       touch CMakeFiles/configure-stamp
+
+build: build-stamp
+
+build-stamp: configure-stamp 
+       dh_testdir
+
+       # Add here commands to compile the package.
+       $(MAKE)
+       #docbook-to-man debian/wavplayer.sgml > wavplayer.1
+
+       for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
+               cat $$f > $${f%.in}; \
+               sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
+               sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
+       done
+
+
+       touch CMakeFiles/$@
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp configure-stamp
+
+       # Add here commands to clean up after the build process.
+       rm -rf CMakeCache.txt
+       rm -rf CMakeFiles
+       rm -rf cmake_install.cmake
+       rm -rf Makefile
+       rm -rf install_manifest.txt
+       rm -rf *.so
+       rm -rf *.edj
+       rm -rf data/*.desktop
+       for i in lowbatt-popup lowmem-popup poweroff-popup; do \
+               rm -rf $$i/CMakeCache.txt; \
+               rm -rf $$i/CMakeFiles; \
+               rm -rf $$i/cmake_install.cmake; \
+               rm -rf $$i/Makefile; \
+               rm -rf $$i/install_manifest.txt; \
+               rm -rf $$i/*.so; \
+               rm -rf $$i/*.edj; \
+               rm -rf $$i/$$i; \
+               for d in `find $(CURDIR) -name "po_*"`; do \
+                       rm -rf $$d/*.mo; \
+               done \
+       done \
+
+       for d in `find $(CURDIR) -name "po_*"`; do \
+               rm -rf $$d/CMakeCache.txt; \
+               rm -rf $$d/CMakeFiles; \
+               rm -rf $$d/cmake_install.cmake; \
+               rm -rf $$d/install_manifest.txt; \
+               rm -rf $$d/Makefile; \
+       done
+
+       for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
+               rm -f $${f%.in}; \
+       done
+
+       dh_clean 
+
+install: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k 
+       dh_installdirs
+
+       # Add here commands to install the package into debian/wavplayer.
+       $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+       dh_testdir
+       dh_testroot
+       dh_installchangelogs 
+       dh_installdocs
+       dh_installexamples
+       dh_install --sourcedir=debian/tmp
+#      dh_installmenu
+#      dh_installdebconf       
+#      dh_installlogrotate
+#      dh_installemacsen
+#      dh_installpam
+#      dh_installmime
+#      dh_python
+#      dh_installinit
+#      dh_installcron
+#      dh_installinfo
+       dh_installman
+       dh_link
+#      Commented dh_strip
+#      dh_strip
+#      Added debug here 
+       dh_strip --dbg-package=system-popup-dbg
+       dh_compress
+       dh_fixperms
+#      dh_perl
+       dh_makeshlibs
+       dh_installdeb
+       dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/edcs/lowbatt.edc b/edcs/lowbatt.edc
new file mode 100644 (file)
index 0000000..5ca19a7
--- /dev/null
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Flora Software License (the "License"). 
+ *
+ * You may obtain a copy of the License at 
+ * http://www.tizenopensource.org/license
+ *
+ * Your use of this source code is conditioned on your acceptance of the 
+ * terms and conditions of the License. 
+ * If you do not agree to the terms and conditions of the License, 
+ * do not use the source code herein.
+ * 
+ * THIS SOURCE CODE IS LICENSED ONLY UNDER THE TERMS OF THE
+ * LICENSE. 
+ * 
+ * THIS SOURCE CODE IS DISTRIBUTED ON AN "AS-IS" BASIS AND
+ * "WITH ALL FAULTS", 
+ * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND,
+ * EXPRESS OR IMPLIED.
+ *  
+ * See the License for specific language governing
+ * permissions and limitations.
+ */
+
+#define MAIN_W 480
+#define MAIN_H 800
+#define POPUP_MAIN_W 458 
+#define POPUP_MAIN_H 240
+
+collections 
+{
+       group 
+       {
+
+                       name: "main";
+                       min: MAIN_W MAIN_H;
+                       parts {
+                                       part 
+                                       { 
+                                         name: "background";
+                                         type: RECT;
+                                         mouse_events: 1;
+                                         description {
+                                                       state: "default" 0.0;
+                                                       rel1 { relative: 0 0; offset: 0 0; }
+                                                       rel2 { relative: 1 1; offset: -1 -1; }
+                                                       color: 0 0 0 100;
+                                               }
+                                       }
+
+                                       part 
+                                       { 
+                                               name: "txt_title";
+                                               type: TEXT;
+                                               mouse_events: 1;
+                                               description {
+                                                       state: "default" 0.0;
+                                                       rel1 { relative: 0.0 0.0; to: background; }
+                                                       rel2 { relative: 1.0 0.5; to: background; }
+                                                       text { text_class: "tc_default"; align: 0.5 0.5; }
+                                                       color: 255 255 255 255;
+                                               }
+                                       }
+
+                                       part 
+                                       { 
+                                               name: "txt_mesg";
+                                               type: TEXT;
+                                               mouse_events: 1;
+                                               description {
+                                                       state: "default" 0.0;
+                                                       rel1 { relative: 0.0 0.5; to: background; }
+                                                       rel2 { relative: 1.0 1.0; to: background; }
+                                                       text { text_class: "tc_default"; align: 0.5 0.5; }
+                                                       color: 255 255 255 255;
+                                               }
+                                       }
+               }
+
+               programs {
+                                       program 
+                                       {
+                                               name: "click_exit";
+                                               source: "background";
+                                               signal: "mouse,clicked,1";
+                                               action: SIGNAL_EMIT "update_clicked" "background";
+                                       }
+                               }
+       }
+       
+       
+   group 
+   {
+                       name: "popup";
+                       min: POPUP_MAIN_W POPUP_MAIN_H;
+                       parts 
+                       {
+                               part { 
+                               name: "background";
+                               type: RECT;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0.0 0.0; offset: 0 0; }
+                                       rel2 { relative: 1.0 1.0; offset: -1 -1; }
+                                       color: 0 0 0 0;
+                                       }
+                               }
+
+                               part { 
+                               name: "txt_title";
+                               type: TEXT;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0.0 0.0; to: background; }
+                                       rel2 { relative: 1.0 0.5; to: background; }
+                                       text { text_class: "tc_default"; align: 0.5 0.5; }
+                                       color: 0 0 0 0;
+                                       }
+                               }
+
+                               part { 
+                               name: "txt_mesg";
+                               type: TEXT;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0.0 0.5; to: background; }
+                                       rel2 { relative: 1.0 1.0; to: background; }
+                                       text { text_class: "GP_Latin"; align: 0.5 0.5; }
+                                       color: 255 255 255 255;
+                                       }
+                               }
+               }
+
+               programs 
+               {
+                               program
+                               {
+                                       name: "bg_click";
+                                       signal: "mouse,down,1";
+                                       source: "bg";
+                                       action, SIGNAL_EMIT "background_click" "background";
+                               }
+                               
+               }
+               
+       }
+       
+}
diff --git a/edcs/lowmem.edc b/edcs/lowmem.edc
new file mode 100644 (file)
index 0000000..f97027f
--- /dev/null
@@ -0,0 +1,143 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+#define MAIN_W 480
+#define MAIN_H 800
+#define POPUP_MAIN_W 458 
+#define POPUP_MAIN_H 240
+
+collections 
+{
+       group 
+       {
+
+                       name: "main";
+                       min: MAIN_W MAIN_H;
+                       parts {
+                                       part 
+                                       { 
+                                         name: "background";
+                                         type: RECT;
+                                         mouse_events: 1;
+                                         description {
+                                                       state: "default" 0.0;
+                                                       rel1 { relative: 0 0; offset: 0 0; }
+                                                       rel2 { relative: 1 1; offset: -1 -1; }
+                                                       color: 0 0 0 100;
+                                               }
+                                       }
+
+                                       part 
+                                       { 
+                                               name: "txt_title";
+                                               type: TEXT;
+                                               mouse_events: 1;
+                                               description {
+                                                       state: "default" 0.0;
+                                                       rel1 { relative: 0.0 0.0; to: background; }
+                                                       rel2 { relative: 1.0 0.5; to: background; }
+                                                       text { text_class: "tc_default"; align: 0.5 0.5; }
+                                                       color: 255 255 255 255;
+                                               }
+                                       }
+
+                                       part 
+                                       { 
+                                               name: "txt_mesg";
+                                               type: TEXT;
+                                               mouse_events: 1;
+                                               description {
+                                                       state: "default" 0.0;
+                                                       rel1 { relative: 0.0 0.5; to: background; }
+                                                       rel2 { relative: 1.0 1.0; to: background; }
+                                                       text { text_class: "tc_default"; align: 0.5 0.5; }
+                                                       color: 255 255 255 255;
+                                               }
+                                       }
+               }
+
+               programs {
+                                       program 
+                                       {
+                                               name: "click_exit";
+                                               source: "background";
+                                               signal: "mouse,clicked,1";
+                                               action: SIGNAL_EMIT "update_clicked" "background";
+                                       }
+                               }
+       }
+       
+       
+   group 
+   {
+                       name: "popup";
+                       min: POPUP_MAIN_W POPUP_MAIN_H;
+                       parts 
+                       {
+                               part { 
+                               name: "background";
+                               type: RECT;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0.0 0.0; offset: 0 0; }
+                                       rel2 { relative: 1.0 1.0; offset: -1 -1; }
+                                       color: 0 0 0 0;
+                                       }
+                               }
+
+                               part { 
+                               name: "txt_title";
+                               type: TEXT;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0.0 0.0; to: background; }
+                                       rel2 { relative: 1.0 0.5; to: background; }
+                                       text { text_class: "tc_default"; align: 0.5 0.5; }
+                                       color: 0 0 0 0;
+                                       }
+                               }
+
+                               part { 
+                               name: "txt_mesg";
+                               type: TEXT;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: 0.0 0.5; to: background; }
+                                       rel2 { relative: 1.0 1.0; to: background; }
+                                       text { text_class: "GP_Latin"; align: 0.5 0.5; }
+                                       color: 255 255 255 255;
+                                       }
+                               }
+               }
+
+               programs 
+               {
+                               program
+                               {
+                                       name: "bg_click";
+                                       signal: "mouse,down,1";
+                                       source: "bg";
+                                       action, SIGNAL_EMIT "background_click" "background";
+                               }
+                               
+               }
+               
+       }
+       
+}
diff --git a/edcs/poweroff.edc b/edcs/poweroff.edc
new file mode 100644 (file)
index 0000000..e955a8c
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+collections {
+       group { name: "elm/popup/content/liststyle_poweroff";
+    parts{
+       part { name: "left_top_padding";
+          type: RECT;
+          scale: 1;
+          description { state: "default" 0.0;
+             fixed: 1 1;
+             visible: 0;
+             align: 0.0 0.0;
+             min: 1 1;
+             max: 1 1;
+          }
+       }
+       part{ name:"elm.swallow.content";
+          type: SWALLOW;
+          scale : 1;
+          description { state: "default" 0.0;
+            min: 615 300;
+                       max: 615 300;
+            align: 0.5 0.5;
+            fixed: 1 0;
+            rel1 {
+               relative: 1.0 1.0;
+              to:"left_top_padding";
+            }
+            rel2 {
+                relative: 0.0 1.0;
+               to:"right_padding";
+            }
+         }
+      }
+      part { name: "right_padding";
+         type: RECT;
+         scale: 1;
+         description { state: "default" 0.0;
+            fixed: 1 0;
+            visible: 0;
+            align: 1.0 0.5;
+            min: 1 1;
+            rel1 {
+                relative: 1.0 0.0;
+                       }
+            rel2 {
+               relative: 1.0 1.0;
+               }
+                }
+                  }
+               }
+       }       
+
+group { name: "elm/popup/content/liststyle_poweroff_simple";
+    parts{
+       part { name: "left_top_padding";
+          type: RECT;
+          scale: 1;
+          description { state: "default" 0.0;
+             fixed: 1 1;
+             visible: 0;
+             align: 0.0 0.0;
+             min: 1 1;
+             max: 1 1;
+          }
+       }
+       part{ name:"elm.swallow.content";
+          type: SWALLOW;
+          scale : 1;
+          description { state: "default" 0.0;
+            min: 615 300;
+                       max: 615 300;
+            align: 0.5 0.5;
+            fixed: 1 0;
+            rel1 {
+               relative: 1.0 1.0;
+               to:"left_top_padding";
+            }
+            rel2 {
+                relative: 0.0 1.0;
+               to:"right_padding";
+            }
+         }
+      }
+      part { name: "right_padding";
+         type: RECT;
+         scale: 1;
+         description { state: "default" 0.0;
+            fixed: 1 0;
+            visible: 0;
+            align: 1.0 0.5;
+            min: 1 1;
+            rel1 {
+                relative: 1.0 0.0;
+                       }
+            rel2 {
+               relative: 1.0 1.0;
+               }
+                }
+                  }
+               }
+       }       
+}
diff --git a/images/01_cont_popup_bottom_center.png b/images/01_cont_popup_bottom_center.png
new file mode 100644 (file)
index 0000000..dd71100
Binary files /dev/null and b/images/01_cont_popup_bottom_center.png differ
diff --git a/images/01_cont_popup_bottom_left.png b/images/01_cont_popup_bottom_left.png
new file mode 100644 (file)
index 0000000..fb7aff1
Binary files /dev/null and b/images/01_cont_popup_bottom_left.png differ
diff --git a/images/01_cont_popup_bottom_right.png b/images/01_cont_popup_bottom_right.png
new file mode 100644 (file)
index 0000000..f3b877c
Binary files /dev/null and b/images/01_cont_popup_bottom_right.png differ
diff --git a/images/01_cont_popup_center_bottom.png b/images/01_cont_popup_center_bottom.png
new file mode 100644 (file)
index 0000000..f8dcbf3
Binary files /dev/null and b/images/01_cont_popup_center_bottom.png differ
diff --git a/images/01_cont_popup_center_top.png b/images/01_cont_popup_center_top.png
new file mode 100644 (file)
index 0000000..a5af0e6
Binary files /dev/null and b/images/01_cont_popup_center_top.png differ
diff --git a/images/01_cont_popup_icon_bg.png b/images/01_cont_popup_icon_bg.png
new file mode 100644 (file)
index 0000000..e1fb8a8
Binary files /dev/null and b/images/01_cont_popup_icon_bg.png differ
diff --git a/images/01_cont_popup_left_bottom.png b/images/01_cont_popup_left_bottom.png
new file mode 100644 (file)
index 0000000..b403443
Binary files /dev/null and b/images/01_cont_popup_left_bottom.png differ
diff --git a/images/01_cont_popup_left_center.png b/images/01_cont_popup_left_center.png
new file mode 100644 (file)
index 0000000..8ea37a5
Binary files /dev/null and b/images/01_cont_popup_left_center.png differ
diff --git a/images/01_cont_popup_left_mid.png b/images/01_cont_popup_left_mid.png
new file mode 100644 (file)
index 0000000..b602791
Binary files /dev/null and b/images/01_cont_popup_left_mid.png differ
diff --git a/images/01_cont_popup_left_top.png b/images/01_cont_popup_left_top.png
new file mode 100644 (file)
index 0000000..3db7727
Binary files /dev/null and b/images/01_cont_popup_left_top.png differ
diff --git a/images/01_cont_popup_right_bottom.png b/images/01_cont_popup_right_bottom.png
new file mode 100644 (file)
index 0000000..373def0
Binary files /dev/null and b/images/01_cont_popup_right_bottom.png differ
diff --git a/images/01_cont_popup_right_center.png b/images/01_cont_popup_right_center.png
new file mode 100644 (file)
index 0000000..eb26ee9
Binary files /dev/null and b/images/01_cont_popup_right_center.png differ
diff --git a/images/01_cont_popup_right_mid.png b/images/01_cont_popup_right_mid.png
new file mode 100644 (file)
index 0000000..ac8c410
Binary files /dev/null and b/images/01_cont_popup_right_mid.png differ
diff --git a/images/01_cont_popup_right_top.png b/images/01_cont_popup_right_top.png
new file mode 100644 (file)
index 0000000..93a8920
Binary files /dev/null and b/images/01_cont_popup_right_top.png differ
diff --git a/images/01_cont_popup_tail_bottom.png b/images/01_cont_popup_tail_bottom.png
new file mode 100644 (file)
index 0000000..83ee153
Binary files /dev/null and b/images/01_cont_popup_tail_bottom.png differ
diff --git a/images/01_cont_popup_tail_left.png b/images/01_cont_popup_tail_left.png
new file mode 100644 (file)
index 0000000..64aa6c1
Binary files /dev/null and b/images/01_cont_popup_tail_left.png differ
diff --git a/images/01_cont_popup_tail_right.png b/images/01_cont_popup_tail_right.png
new file mode 100644 (file)
index 0000000..f9d49b3
Binary files /dev/null and b/images/01_cont_popup_tail_right.png differ
diff --git a/images/01_cont_popup_tail_top.png b/images/01_cont_popup_tail_top.png
new file mode 100644 (file)
index 0000000..f4f7b79
Binary files /dev/null and b/images/01_cont_popup_tail_top.png differ
diff --git a/images/01_cont_popup_top_center.png b/images/01_cont_popup_top_center.png
new file mode 100644 (file)
index 0000000..dd0e874
Binary files /dev/null and b/images/01_cont_popup_top_center.png differ
diff --git a/images/01_cont_popup_top_left.png b/images/01_cont_popup_top_left.png
new file mode 100644 (file)
index 0000000..f2f1231
Binary files /dev/null and b/images/01_cont_popup_top_left.png differ
diff --git a/images/01_cont_popup_top_right.png b/images/01_cont_popup_top_right.png
new file mode 100644 (file)
index 0000000..db92567
Binary files /dev/null and b/images/01_cont_popup_top_right.png differ
diff --git a/images/01_popup_bg.png b/images/01_popup_bg.png
new file mode 100644 (file)
index 0000000..c1f1632
Binary files /dev/null and b/images/01_popup_bg.png differ
diff --git a/images/01_popup_bg_bottom.png b/images/01_popup_bg_bottom.png
new file mode 100644 (file)
index 0000000..ce73680
Binary files /dev/null and b/images/01_popup_bg_bottom.png differ
diff --git a/images/01_popup_bg_middle.png b/images/01_popup_bg_middle.png
new file mode 100644 (file)
index 0000000..a1a0715
Binary files /dev/null and b/images/01_popup_bg_middle.png differ
diff --git a/images/01_popup_bg_top.png b/images/01_popup_bg_top.png
new file mode 100644 (file)
index 0000000..a4eb3a7
Binary files /dev/null and b/images/01_popup_bg_top.png differ
diff --git a/images/01_popup_button_gray.png b/images/01_popup_button_gray.png
new file mode 100644 (file)
index 0000000..f2d0079
Binary files /dev/null and b/images/01_popup_button_gray.png differ
diff --git a/images/01_popup_button_gray_c.png b/images/01_popup_button_gray_c.png
new file mode 100644 (file)
index 0000000..d09b26c
Binary files /dev/null and b/images/01_popup_button_gray_c.png differ
diff --git a/images/01_popup_button_gray_dim_c.png b/images/01_popup_button_gray_dim_c.png
new file mode 100644 (file)
index 0000000..46fbf02
Binary files /dev/null and b/images/01_popup_button_gray_dim_c.png differ
diff --git a/images/01_popup_button_gray_dim_l.png b/images/01_popup_button_gray_dim_l.png
new file mode 100644 (file)
index 0000000..420008c
Binary files /dev/null and b/images/01_popup_button_gray_dim_l.png differ
diff --git a/images/01_popup_button_gray_dim_r.png b/images/01_popup_button_gray_dim_r.png
new file mode 100644 (file)
index 0000000..f3c5a22
Binary files /dev/null and b/images/01_popup_button_gray_dim_r.png differ
diff --git a/images/01_popup_button_gray_l.png b/images/01_popup_button_gray_l.png
new file mode 100644 (file)
index 0000000..8e2a36c
Binary files /dev/null and b/images/01_popup_button_gray_l.png differ
diff --git a/images/01_popup_button_gray_press_c.png b/images/01_popup_button_gray_press_c.png
new file mode 100644 (file)
index 0000000..9e25350
Binary files /dev/null and b/images/01_popup_button_gray_press_c.png differ
diff --git a/images/01_popup_button_gray_press_l.png b/images/01_popup_button_gray_press_l.png
new file mode 100644 (file)
index 0000000..c7cd300
Binary files /dev/null and b/images/01_popup_button_gray_press_l.png differ
diff --git a/images/01_popup_button_gray_press_r.png b/images/01_popup_button_gray_press_r.png
new file mode 100644 (file)
index 0000000..208365e
Binary files /dev/null and b/images/01_popup_button_gray_press_r.png differ
diff --git a/images/01_popup_button_gray_r.png b/images/01_popup_button_gray_r.png
new file mode 100644 (file)
index 0000000..01c0efd
Binary files /dev/null and b/images/01_popup_button_gray_r.png differ
diff --git a/images/01_popup_progress_loading_blue_02_bg.png b/images/01_popup_progress_loading_blue_02_bg.png
new file mode 100644 (file)
index 0000000..d281058
Binary files /dev/null and b/images/01_popup_progress_loading_blue_02_bg.png differ
diff --git a/images/01_popup_progress_loading_blue_91_bg.png b/images/01_popup_progress_loading_blue_91_bg.png
new file mode 100644 (file)
index 0000000..d8cf41c
Binary files /dev/null and b/images/01_popup_progress_loading_blue_91_bg.png differ
diff --git a/images/01_popup_progress_loading_orange_02_bg.png b/images/01_popup_progress_loading_orange_02_bg.png
new file mode 100644 (file)
index 0000000..3ae13a5
Binary files /dev/null and b/images/01_popup_progress_loading_orange_02_bg.png differ
diff --git a/images/01_popup_progress_loading_orange_91_bg.png b/images/01_popup_progress_loading_orange_91_bg.png
new file mode 100644 (file)
index 0000000..d76bca6
Binary files /dev/null and b/images/01_popup_progress_loading_orange_91_bg.png differ
diff --git a/images/01_popup_scrollbar_bg_bottom.png b/images/01_popup_scrollbar_bg_bottom.png
new file mode 100644 (file)
index 0000000..7076c9a
Binary files /dev/null and b/images/01_popup_scrollbar_bg_bottom.png differ
diff --git a/images/01_popup_scrollbar_bg_middle.png b/images/01_popup_scrollbar_bg_middle.png
new file mode 100644 (file)
index 0000000..2a83440
Binary files /dev/null and b/images/01_popup_scrollbar_bg_middle.png differ
diff --git a/images/01_popup_scrollbar_bg_top.png b/images/01_popup_scrollbar_bg_top.png
new file mode 100644 (file)
index 0000000..b4d36d8
Binary files /dev/null and b/images/01_popup_scrollbar_bg_top.png differ
diff --git a/images/PUT_IMAGES_HERE b/images/PUT_IMAGES_HERE
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lowbatt-popup/CMakeLists.txt b/lowbatt-popup/CMakeLists.txt
new file mode 100644 (file)
index 0000000..a9e7eb3
--- /dev/null
@@ -0,0 +1,68 @@
+
+#################### Low-battery ###############################
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(lowbatt-popup C)
+
+SET(SRCS ${CMAKE_SOURCE_DIR}/lowbatt-popup/src/lowbatt.c)
+
+IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+       SET(CMAKE_BUILD_TYPE "Release")
+ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lowbatt-popup)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED appcore-efl elementary devman devman_haptic mm-sound notification sysman)
+
+FOREACH(flag ${pkgs_CFLAGS})
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag} -g")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g ")
+SET(CMAKE_C_FLAGS_RELEASE "-O2")
+
+FIND_PROGRAM(UNAME NAMES uname)
+EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
+IF("${ARCH}" STREQUAL "arm")
+       ADD_DEFINITIONS("-DTARGET")
+       MESSAGE("add -DTARGET")
+ENDIF("${ARCH}" STREQUAL "arm")
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DSLP_DEBUG")
+
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
+
+ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
+
+ADD_CUSTOM_TARGET(lowbatt.edj
+               COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/../images
+               ${CMAKE_SOURCE_DIR}/edcs/lowbatt.edc ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/lowbatt.edj
+               DEPENDS ${CMAKE_SOURCE_DIR}/edcs/lowbatt.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} lowbatt.edj)
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /opt/apps/org.tizen.lowbat-syspopup/bin)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/lowbatt.edj DESTINATION /opt/apps/org.tizen.lowbat-syspopup/res/edje/lowbatt)
+
+# install desktop file & icon
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/data/org.tizen.lowbat-syspopup.desktop.in ${CMAKE_SOURCE_DIR}/data/org.tizen.lowbat-syspopup.desktop)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/org.tizen.lowbat-syspopup.desktop DESTINATION /opt/share/applications/)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/org.tizen.lowbat-syspopup.png DESTINATION /opt/apps/org.tizen.lowbat-syspopup/res/icon)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/sound/09_Low_Battery.wav DESTINATION /opt/apps/org.tizen.lowbat-syspopup/res/keysound)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/batt_full_icon.png DESTINATION /opt/apps/org.tizen.lowbat-syspopup/res/icons/)
+
+# install ini file
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${PROJECT_NAME}.ini DESTINATION /opt/share/process-info)
+
+# i18n
+ADD_SUBDIRECTORY(po_lowbatt)
+
+###############################################################
+
+
diff --git a/lowbatt-popup/po_lowbatt/CMakeLists.txt b/lowbatt-popup/po_lowbatt/CMakeLists.txt
new file mode 100644 (file)
index 0000000..cf30271
--- /dev/null
@@ -0,0 +1,24 @@
+# for i18n
+
+SET(POFILES de_DE.po el_GR.po en.po es_ES.po fr_FR.po it_IT.po ja_JP.po ko_KR.po nl_NL.po pt_PT.po ru_RU.po tr_TR.po zh_CN.po zh_HK.po zh_TW.po)
+
+SET(MSGFMT "/usr/bin/msgfmt")
+
+FOREACH(pofile ${POFILES})
+       SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})
+       MESSAGE("PO: ${pofile}")
+       GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE)
+       GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE)
+       SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo)
+       ADD_CUSTOM_COMMAND(
+                       OUTPUT ${moFile}
+                       COMMAND ${MSGFMT} -o ${moFile} ${absPofile}
+                       DEPENDS ${absPofile}
+       )
+       INSTALL(FILES ${moFile}
+                       DESTINATION /opt/apps/org.tizen.lowbat-syspopup/res/locale/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+       SET(moFiles ${moFiles} ${moFile})
+ENDFOREACH(pofile)
+
+MESSAGE(".mo files: ${moFiles}")
+ADD_CUSTOM_TARGET(po_lowbatt ALL DEPENDS ${moFiles})
diff --git a/lowbatt-popup/po_lowbatt/de_DE.po b/lowbatt-popup/po_lowbatt/de_DE.po
new file mode 100755 (executable)
index 0000000..01c2788
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_COM_POP_BATTERYLOW"
+msgstr "Akku fast leer"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Systeminfo"
+
+msgid "IDS_COM_POP_LOW_BATTERY_PHONE_WILL_SHUT_DOWN"
+msgstr "Akku leer. Gerät wird heruntergefahren"
+
+msgid "IDS_COM_BODY_CHARGING_PAUSED_DUE_TO_EXTREME_TEMPERATURE"
+msgstr "Laden aufgrund extremer Temperatur unterbrochen"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
diff --git a/lowbatt-popup/po_lowbatt/el_GR.po b/lowbatt-popup/po_lowbatt/el_GR.po
new file mode 100755 (executable)
index 0000000..3b19505
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_COM_POP_BATTERYLOW"
+msgstr "Χαμηλή μπαταρία"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Πληρ. Συστήμ."
+
+msgid "IDS_COM_POP_LOW_BATTERY_PHONE_WILL_SHUT_DOWN"
+msgstr "Χαμηλή στάθμη μπαταρίας. Το τηλέφωνο θα απενεργοποιηθεί"
+
+msgid "IDS_COM_BODY_CHARGING_PAUSED_DUE_TO_EXTREME_TEMPERATURE"
+msgstr "Παύση φόρτισης λόγω ακραίας θερμοκρασίας"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
diff --git a/lowbatt-popup/po_lowbatt/en.po b/lowbatt-popup/po_lowbatt/en.po
new file mode 100755 (executable)
index 0000000..483c45c
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_COM_POP_BATTERYLOW"
+msgstr "Low battery"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "System info"
+
+msgid "IDS_COM_POP_LOW_BATTERY_PHONE_WILL_SHUT_DOWN"
+msgstr "Low battery. Phone will shut down"
+
+msgid "IDS_COM_BODY_CHARGING_PAUSED_DUE_TO_EXTREME_TEMPERATURE"
+msgstr "Charging paused due to extreme temperature"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
diff --git a/lowbatt-popup/po_lowbatt/es_ES.po b/lowbatt-popup/po_lowbatt/es_ES.po
new file mode 100755 (executable)
index 0000000..f80a658
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_COM_POP_BATTERYLOW"
+msgstr "Batería baja"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Información del sistema"
+
+msgid "IDS_COM_POP_LOW_BATTERY_PHONE_WILL_SHUT_DOWN"
+msgstr "Batería baja. El teléfono se apagará"
+
+msgid "IDS_COM_BODY_CHARGING_PAUSED_DUE_TO_EXTREME_TEMPERATURE"
+msgstr "La carga se detuvo por temperatura alta"
+
+msgid "IDS_ST_SK_OK"
+msgstr "Aceptar"
diff --git a/lowbatt-popup/po_lowbatt/fr_FR.po b/lowbatt-popup/po_lowbatt/fr_FR.po
new file mode 100755 (executable)
index 0000000..00fb83f
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_COM_POP_BATTERYLOW"
+msgstr "Batterie faible"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Infos système"
+
+msgid "IDS_COM_POP_LOW_BATTERY_PHONE_WILL_SHUT_DOWN"
+msgstr "Batterie faible. Le téléphone va s'éteindre"
+
+msgid "IDS_COM_BODY_CHARGING_PAUSED_DUE_TO_EXTREME_TEMPERATURE"
+msgstr "Chargement interrompu. Température trop élevée"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
diff --git a/lowbatt-popup/po_lowbatt/it_IT.po b/lowbatt-popup/po_lowbatt/it_IT.po
new file mode 100755 (executable)
index 0000000..48db476
--- /dev/null
@@ -0,0 +1,15 @@
+msgid "IDS_COM_POP_BATTERYLOW"
+msgstr "Batteria scarica"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Info sistema"
+
+msgid "IDS_COM_POP_LOW_BATTERY_PHONE_WILL_SHUT_DOWN"
+msgstr "Batteria scarica. Il telefono si spegnerà"
+
+msgid "IDS_COM_BODY_CHARGING_PAUSED_DUE_TO_EXTREME_TEMPERATURE"
+msgstr "Carica interrotta per surriscaldamento"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
+
diff --git a/lowbatt-popup/po_lowbatt/ja_JP.po b/lowbatt-popup/po_lowbatt/ja_JP.po
new file mode 100755 (executable)
index 0000000..2de7566
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_COM_POP_BATTERYLOW"
+msgstr "バッテリー残量不足"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "システム​情報"
+
+msgid "IDS_COM_POP_LOW_BATTERY_PHONE_WILL_SHUT_DOWN"
+msgstr "電池残量が不足しています。電源が切れます"
+
+msgid "IDS_COM_BODY_CHARGING_PAUSED_DUE_TO_EXTREME_TEMPERATURE"
+msgstr "極端な<200b>温度<200b>に<200b>より<200b>充電<200b>を<200b>中止<200b>しました"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
diff --git a/lowbatt-popup/po_lowbatt/ko_KR.po b/lowbatt-popup/po_lowbatt/ko_KR.po
new file mode 100755 (executable)
index 0000000..a7a8fe4
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_COM_POP_BATTERYLOW"
+msgstr "배터리가 부족합니다"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "시스템 정보"
+
+msgid "IDS_COM_POP_LOW_BATTERY_PHONE_WILL_SHUT_DOWN"
+msgstr "배터리가 부족하여 휴대폰 전원이 꺼집니다"
+
+msgid "IDS_COM_BODY_CHARGING_PAUSED_DUE_TO_EXTREME_TEMPERATURE"
+msgstr "온도가 너무 높거나 낮아 충전이 중지되었습니다"
+
+msgid "IDS_ST_SK_OK"
+msgstr "확인"
diff --git a/lowbatt-popup/po_lowbatt/nl_NL.po b/lowbatt-popup/po_lowbatt/nl_NL.po
new file mode 100755 (executable)
index 0000000..aaac3de
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_COM_POP_BATTERYLOW"
+msgstr "Batterij bijna leeg"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Systeeminfo"
+
+msgid "IDS_COM_POP_LOW_BATTERY_PHONE_WILL_SHUT_DOWN"
+msgstr "Batterij bijna leeg. Uw telefoon wordt uitgeschakeld."
+
+msgid "IDS_COM_BODY_CHARGING_PAUSED_DUE_TO_EXTREME_TEMPERATURE"
+msgstr "Opladen gestopt vanwege te hoge of te lage temperatuur"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
diff --git a/lowbatt-popup/po_lowbatt/pt_PT.po b/lowbatt-popup/po_lowbatt/pt_PT.po
new file mode 100755 (executable)
index 0000000..f78ee5b
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_COM_POP_BATTERYLOW"
+msgstr "Bateria fraca"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Info. sist."
+
+msgid "IDS_COM_POP_LOW_BATTERY_PHONE_WILL_SHUT_DOWN"
+msgstr "Bateria fraca. O telefone será encerrado"
+
+msgid "IDS_COM_BODY_CHARGING_PAUSED_DUE_TO_EXTREME_TEMPERATURE"
+msgstr "Carregamento interrompido devido a excesso de temperatura"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
diff --git a/lowbatt-popup/po_lowbatt/ru_RU.po b/lowbatt-popup/po_lowbatt/ru_RU.po
new file mode 100755 (executable)
index 0000000..1f914fd
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_COM_POP_BATTERYLOW"
+msgstr "Аккумулятор разряжен"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Системная информация"
+
+msgid "IDS_COM_POP_LOW_BATTERY_PHONE_WILL_SHUT_DOWN"
+msgstr "Низкий заряд батареи. Телефон будет выключен"
+
+msgid "IDS_COM_BODY_CHARGING_PAUSED_DUE_TO_EXTREME_TEMPERATURE"
+msgstr "Зарядка остановлена из-за температуры"
+
+msgid "IDS_ST_SK_OK"
+msgstr "Да"
diff --git a/lowbatt-popup/po_lowbatt/tr_TR.po b/lowbatt-popup/po_lowbatt/tr_TR.po
new file mode 100755 (executable)
index 0000000..53c1aa0
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_COM_POP_BATTERYLOW"
+msgstr "Düşük pil"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Sistem bilgi."
+
+msgid "IDS_COM_POP_LOW_BATTERY_PHONE_WILL_SHUT_DOWN"
+msgstr "Düşük pil. Telefon kapatılacak"
+
+msgid "IDS_COM_BODY_CHARGING_PAUSED_DUE_TO_EXTREME_TEMPERATURE"
+msgstr "Aşırı sıcaklık nedeniyle şarj işlemi durduruldu"
+
+msgid "IDS_ST_SK_OK"
+msgstr "Tamam"
diff --git a/lowbatt-popup/po_lowbatt/zh_CN.po b/lowbatt-popup/po_lowbatt/zh_CN.po
new file mode 100755 (executable)
index 0000000..6a5b6e7
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_COM_POP_BATTERYLOW"
+msgstr "电量低"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "系统信息"
+
+msgid "IDS_COM_POP_LOW_BATTERY_PHONE_WILL_SHUT_DOWN"
+msgstr "电量低。电话将关闭"
+
+msgid "IDS_COM_BODY_CHARGING_PAUSED_DUE_TO_EXTREME_TEMPERATURE"
+msgstr "温度过高,暂停充电"
+
+msgid "IDS_ST_SK_OK"
+msgstr "确认"
diff --git a/lowbatt-popup/po_lowbatt/zh_HK.po b/lowbatt-popup/po_lowbatt/zh_HK.po
new file mode 100755 (executable)
index 0000000..6da8a2e
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_COM_POP_BATTERYLOW"
+msgstr "電量不足"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "系統資料"
+
+msgid "IDS_COM_POP_LOW_BATTERY_PHONE_WILL_SHUT_DOWN"
+msgstr "電量不足。手機將會關閉"
+
+msgid "IDS_COM_BODY_CHARGING_PAUSED_DUE_TO_EXTREME_TEMPERATURE"
+msgstr "由於溫度過高或過低而導致充電暫停"
+
+msgid "IDS_ST_SK_OK"
+msgstr "確定"
diff --git a/lowbatt-popup/po_lowbatt/zh_TW.po b/lowbatt-popup/po_lowbatt/zh_TW.po
new file mode 100755 (executable)
index 0000000..dc709bf
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_COM_POP_BATTERYLOW"
+msgstr "電量不足"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "系統訊息"
+
+msgid "IDS_COM_POP_LOW_BATTERY_PHONE_WILL_SHUT_DOWN"
+msgstr "電量不足。手機將會關閉"
+
+msgid "IDS_COM_BODY_CHARGING_PAUSED_DUE_TO_EXTREME_TEMPERATURE"
+msgstr "極端溫度導致充電暫停"
+
+msgid "IDS_ST_SK_OK"
+msgstr "確定"
diff --git a/lowbatt-popup/src/lowbatt.c b/lowbatt-popup/src/lowbatt.c
new file mode 100644 (file)
index 0000000..b034170
--- /dev/null
@@ -0,0 +1,403 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+
+#include <stdio.h>
+#include <appcore-efl.h>
+#include <sensor.h>
+#include <devman_haptic.h>
+#include <devman.h>
+#include <mmf/mm_sound.h>
+#include <pmapi.h>
+#include <sysman.h>
+#include "lowbatt.h"
+#include <vconf.h>
+#include <vconf-keys.h>
+#include <Ecore_X.h>
+#include <utilX.h>
+#include <syspopup.h>
+
+#define CHECK_ACT                      0
+#define WARNING_ACT            1
+#define POWER_OFF_ACT          2
+#define CHARGE_ERROR_ACT       3
+
+#define BATTERY_FULL_ICON_PATH                 "/opt/apps/com.samsung.lowbat-syspopup/res/icons/batt_full_icon.png"
+#define VCONFKEY_TESTMODE_LOW_BATT_POPUP       "db/testmode/low_batt_popup"
+
+static int option = -1;
+
+int myterm(bundle *b, void *data)
+{
+       return 0;
+}
+
+int mytimeout(bundle *b, void *data)
+{
+       lowbatt_timeout_func(data);
+       return 0;
+}
+
+syspopup_handler handler = {
+       .def_term_fn = myterm,
+       .def_timeout_fn = mytimeout
+};
+
+/* App Life cycle funtions */
+static void win_del(void *data, Evas_Object * obj, void *event)
+{
+       elm_exit();
+}
+
+/* Quit  */
+static void main_quit_cb(void *data, Evas_Object *obj, const char *emission,
+                            const char *source)
+{
+       elm_exit();
+}
+
+/* Update text font */
+static void update_ts(Evas_Object *eo, struct text_part *tp, int size)
+{
+       int i;
+
+       if (eo == NULL || tp == NULL || size < 0)
+               return;
+
+       for (i = 0; i < size; i++) {
+               if (tp[i].part && tp[i].msgid)
+                       edje_object_part_text_set(eo, tp[i].part,
+                                                 _(tp[i].msgid));
+       }
+}
+
+/* Language changed noti handler */
+static int lang_changed(void *data)
+{
+       struct appdata *ad = data;
+
+       if (ad->layout_main == NULL)
+               return 0;
+
+       update_ts(elm_layout_edje_get(ad->layout_main), main_txt,
+                 sizeof(main_txt) / sizeof(main_txt[0]));
+       return 0;
+}
+
+/* Create main window */
+static Evas_Object *create_win(const char *name)
+{
+       Evas_Object *eo;
+       int w, h;
+
+       eo = elm_win_add(NULL, name, ELM_WIN_DIALOG_BASIC);
+       if (eo) {
+               elm_win_title_set(eo, name);
+               elm_win_borderless_set(eo, EINA_TRUE);
+               evas_object_smart_callback_add(eo, "delete,request", win_del, NULL);
+               elm_win_alpha_set(eo, EINA_TRUE);
+               ecore_x_window_size_get(ecore_x_window_root_first_get(), &w,
+                                       &h);
+               evas_object_resize(eo, w, h);
+       }
+
+       return eo;
+}
+
+/* Read from EDJ file */
+static Evas_Object *load_edj(Evas_Object * parent, const char *file,
+                            const char *group)
+{
+       Evas_Object *eo;
+       int r;
+
+       eo = elm_layout_add(parent);
+       if (eo) {
+               r = elm_layout_file_set(eo, file, group);
+               if (!r) {
+                       evas_object_del(eo);
+                       return NULL;
+               }
+
+               evas_object_size_hint_weight_set(eo, EVAS_HINT_EXPAND,
+                                                EVAS_HINT_EXPAND);
+       }
+
+       return eo;
+}
+
+/* Terminate noti handler */
+static int app_terminate(void *data)
+{
+       struct appdata *ad = data;
+
+       if (ad->layout_main)
+               evas_object_del(ad->layout_main);
+
+       if (ad->win_main)
+               evas_object_del(ad->win_main);
+
+       return 0;
+}
+
+/* Pause/background */
+static int app_pause(void *data)
+{
+       return 0;
+}
+
+/* Resume */
+static int app_resume(void *data)
+{
+       return 0;
+}
+
+
+/* Reset */
+static int app_reset(bundle *b, void *data)
+{
+       struct appdata *ad = data;
+       char *opt = NULL;
+
+       opt = bundle_get_val(b, "_SYSPOPUP_CONTENT_");
+       if (opt == NULL)
+               option = CHECK_ACT;
+       else if (!strcmp(opt,"warning"))
+               option = WARNING_ACT;
+       else if (!strcmp(opt,"poweroff"))
+               option = POWER_OFF_ACT;
+       else if (!strcmp(opt,"chargeerr"))
+               option = CHARGE_ERROR_ACT;
+       else
+               option = CHECK_ACT;
+
+       if (syspopup_has_popup(b)) {
+               if(option == CHECK_ACT) {
+                       return 0;
+               }
+               syspopup_reset(b);
+       } else {
+               if(option == CHECK_ACT) {
+                       exit(0);
+               }
+               syspopup_create(b, &handler, ad->win_main, ad);
+               evas_object_show(ad->win_main);
+
+               /* Start Main UI */
+               lowbatt_start((void *)ad);
+       }
+
+       return 0;
+}
+
+/* Customized print */
+void system_print(const char *format, ...)
+{
+       /* Un-comment return to disable logs */
+       return;
+
+       va_list args;
+       va_start(args, format);
+       vfprintf(stderr, format, args);
+       va_end(args);
+}
+
+/* Cleanup objects to avoid mem-leak */
+void lowbatt_cleanup(struct appdata *ad)
+{
+       if (ad == NULL)
+               return;
+
+       if (ad->popup)
+               evas_object_del(ad->popup);
+       if (ad->layout_main)
+               evas_object_del(ad->layout_main);
+}
+
+/* Background clicked noti */
+static void bg_clicked_cb(void *data, Evas * e, Evas_Object * obj, void *event_info)
+{
+       system_print("\n system-popup : Inside bg clicked \n");
+       exit(0);
+}   
+        
+static void bg_noti_cb(void *data)
+{   
+       ui_bgimg_reload((Evas_Object *) data);
+}
+
+/* Create indicator bar */
+static int lowbatt_create_indicator(struct appdata *ad)
+{
+       elm_win_indicator_mode_set(ad->win_main, ELM_WIN_INDICATOR_HIDE);
+       return 0;
+}
+
+/* Play vibration */
+static int lowbatt_play_vibration()
+{
+       int ret_val = 0;
+       int dev_handle = 0;
+       int mode = 0;
+
+       /* Open the haptic device */
+       dev_handle = device_haptic_open(DEV_IDX_0, mode);
+       if (dev_handle < 0)
+               return -1;
+
+       /* Play a monotone pattern for 1s */
+       ret_val = device_haptic_play_monotone(dev_handle, 1000);
+       device_haptic_close(dev_handle);
+       if (ret_val < 0)
+               return -1;
+
+       return 0;
+}
+
+void lowbatt_timeout_func(void *data)
+{
+       system_print("\n System-popup : In Lowbatt timeout\n");
+       lowbatt_cleanup(data);
+
+       /* If poweroff requested */
+       if (option == POWER_OFF_ACT) {
+                       if (sysman_call_predef_action(PREDEF_POWEROFF, 0) == -1) {
+                               system_print
+                                   ("System-popup : failed to request poweroff to system_server \n");
+                               fflush(stdout);
+                               system("poweroff");
+                       }
+               }
+       /* Now get lost */
+       exit(0);
+}
+
+/* Basic popup widget */
+static int lowbatt_create_and_show_basic_popup(struct appdata *ad)
+{
+       Evas_Object *btn1;
+
+       /* Add beat ui popup */
+       /* No need to pass main window ptr */
+       ad->popup = elm_popup_add(ad->win_main);
+       if (ad->popup == NULL) {
+               system_print("\n System-popup : Add popup failed \n");
+               return -1;
+       }
+       evas_object_smart_callback_add(ad->popup, "block,clicked", lowbatt_timeout_func, ad);
+       evas_object_size_hint_weight_set(ad->popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+       elm_popup_timeout_set(ad->layout_main, 3);
+
+       /* Check launch option */
+       if (option == CHARGE_ERROR_ACT)
+               elm_object_text_set(ad->popup, _("IDS_COM_BODY_CHARGING_PAUSED_DUE_TO_EXTREME_TEMPERATURE"));
+       else if (option == WARNING_ACT)
+               elm_object_text_set(ad->popup, _("IDS_COM_POP_BATTERYLOW"));
+       else
+               elm_object_text_set(ad->popup, _("IDS_COM_POP_LOW_BATTERY_PHONE_WILL_SHUT_DOWN"));
+       elm_object_part_text_set(ad->popup, "title,text", _("IDS_COM_BODY_SYSTEM_INFO_ABB"));
+
+       btn1 = elm_button_add(ad->popup);
+       elm_object_text_set(btn1, _("IDS_ST_SK_OK"));
+       elm_object_part_content_set(ad->popup, "button1", btn1);
+       evas_object_smart_callback_add(btn1, "clicked", lowbatt_timeout_func, ad);
+
+
+       /* Add callback */
+       evas_object_smart_callback_add(ad->popup, "response", lowbatt_timeout_func, ad);
+
+       Ecore_X_Window xwin;
+       xwin = elm_win_xwindow_get(ad->popup);
+       ecore_x_netwm_window_type_set(xwin, ECORE_X_WINDOW_TYPE_NOTIFICATION);
+       utilx_set_system_notification_level(ecore_x_display_get(), xwin, UTILX_NOTIFICATION_LEVEL_HIGH);
+       evas_object_show(ad->popup);
+
+       return 0;
+}
+
+int lowbatt_start(void *data)
+{
+       struct appdata *ad = data;
+       int ret_val = 0;
+
+       /* Create and show popup */
+       ret_val = lowbatt_create_and_show_basic_popup(ad);
+       if (ret_val != 0)
+               return -1;
+
+       /* Change LCD brightness */
+       ret_val = pm_change_state(LCD_NORMAL);
+       if (ret_val != 0)
+               return -1;
+
+       /* Play vibration */
+       ret_val = lowbatt_play_vibration();
+       if (ret_val == -1)
+               system_print("\n Lowbatt : Play vibration failed \n");
+
+       /* Play the sound alert */
+       ret_val = mm_sound_play_keysound(SOUND_PATH, 1);
+       if (ret_val != 0)
+               system_print("\n Lowmem : Play sound failed \n");
+
+       return 0;
+}
+
+/* App init */
+int app_create(void *data)
+{
+       Evas_Object *win;
+       struct appdata *ad = data;
+
+       /* create window */
+       win = create_win(PACKAGE);
+       if (win == NULL)
+               return -1;
+
+       ad->win_main = win;
+
+       elm_theme_overlay_add(NULL,EDJ_NAME); 
+
+       return 0;
+}
+
+int main(int argc, char *argv[])
+{
+       struct appdata ad;
+
+       /* App life cycle management */
+       struct appcore_ops ops = {
+               .create = app_create,
+               .terminate = app_terminate,
+               .pause = app_pause,
+               .resume = app_resume,
+               .reset = app_reset,
+       };
+
+       memset(&ad, 0x0, sizeof(struct appdata));
+       ops.data = &ad;
+
+       int val = -1, ret = -1;
+
+       ret = vconf_get_int(VCONFKEY_TESTMODE_LOW_BATT_POPUP, &val);
+       if(ret == 0 && val == 1) {
+               system_print("Testmode without launching popup");
+               return 0;
+       }
+
+       return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
+}
diff --git a/lowbatt-popup/src/lowbatt.h b/lowbatt-popup/src/lowbatt.h
new file mode 100644 (file)
index 0000000..e4848b0
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+
+#ifndef __DEF_lowbatt_H_
+#define __DEF_lowbatt_H_
+
+#include <Elementary.h>
+
+#ifndef PREFIX
+#define PREFIX "/usr"
+#endif /* PREFIX */
+
+#define TEMP_DIR                       "/tmp"
+#define PACKAGE                                "lowbatt-popup"
+#define APPNAME                                "lowbatt-popup"
+#define ICON_DIR                       "/opt/apps/org.tizen.lowbat-syspopup/res/images"
+#define BG_IMAGE                       TEMP_DIR"/01_popup_bg.jpg"
+#define MAIN_W                         (480)
+#define MAIN_H                         (800)
+#define EDJ_PATH                       "/opt/apps/org.tizen.lowbat-syspopup/res/edje/lowbatt"
+#define EDJ_NAME                       EDJ_PATH"/lowbatt.edj"
+#define GRP_MAIN                       "main"
+#define GRP_POPUP                      "popup"
+#define NEW_INDI
+#define APPLICATION_BG                 1
+#define INDICATOR_HEIGHT               (38)
+#define SOUND_PATH                     "/opt/apps/org.tizen.lowbat-syspopup/res/keysound/09_Low_Battery.wav"
+
+#ifndef PREDEF_POWEROFF
+#define PREDEF_POWEROFF                        "poweroff"
+#endif /* PREFEF_POWEROFF */
+       
+#define BEAT
+
+/* Acct profiling support */
+#define  ACCT_PROF
+#ifdef   ACCT_PROF
+#include <sys/acct.h>
+#endif /* ACCT_PROF */
+
+/* Text layout */
+struct text_part {
+       char *part;
+       char *msgid;
+};
+
+/* Main text */
+struct text_part main_txt[] = {
+       {"txt_title", N_("Lowbatt"),},
+       {"txt_mesg", N_(""),},
+};
+
+struct appdata {
+       Evas *evas;
+       Evas_Object *win_main;
+       Evas_Object *popup;
+       Evas_Object *layout_main;
+
+       Evas_Object *root_w;
+       Evas_Object *root_h;
+       Evas_Object *bg;
+       Evas_Object *indicator;
+
+       double w_ratio;
+       double h_ratio;
+
+};
+
+#endif                         /* __DEF_lowbatt_H__ */
diff --git a/lowmem-popup/CMakeLists.txt b/lowmem-popup/CMakeLists.txt
new file mode 100644 (file)
index 0000000..3f924ae
--- /dev/null
@@ -0,0 +1,66 @@
+
+########################### low memory ###########################
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(lowmem-popup C)
+
+SET(SRCS ${CMAKE_SOURCE_DIR}/lowmem-popup/src/lowmem.c)
+
+IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+       SET(CMAKE_BUILD_TYPE "Release")
+ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lowmem-popup)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED appcore-efl elementary devman devman_haptic mm-sound sysman syspopup ecore-evas)
+
+FOREACH(flag ${pkgs_CFLAGS})
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag} -g -I/usr/include/elementary-0 ")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+SET(CMAKE_C_FLAGS_RELEASE "-O2")
+
+FIND_PROGRAM(UNAME NAMES uname)
+EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
+IF("${ARCH}" STREQUAL "arm")
+       ADD_DEFINITIONS("-DTARGET")
+       MESSAGE("add -DTARGET")
+ENDIF("${ARCH}" STREQUAL "arm")
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DSLP_DEBUG")
+
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
+
+ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
+
+ADD_CUSTOM_TARGET(lowmem.edj
+               COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/../images
+               ${CMAKE_SOURCE_DIR}/edcs/lowmem.edc ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/lowmem.edj
+               DEPENDS ${CMAKE_SOURCE_DIR}/edcs/lowmem.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} lowmem.edj)
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /opt/apps/org.tizen.lowmem-syspopup/bin)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/lowmem.edj DESTINATION /opt/apps/org.tizen.lowmem-syspopup/res/edje/lowmem)
+
+# install desktop file & icon
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/data/org.tizen.lowmem-syspopup.desktop.in ${CMAKE_SOURCE_DIR}/data/org.tizen.lowmem-syspopup.desktop)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/org.tizen.lowmem-syspopup.desktop DESTINATION /opt/share/applications/)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/org.tizen.lowmem-syspopup.png DESTINATION /opt/apps/org.tizen.lowmem-syspopup/res/icon)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/sound/02_Warning.wav DESTINATION /opt/apps/org.tizen.lowmem-syspopup/res/keysound)
+
+# install ini file
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${PROJECT_NAME}.ini DESTINATION /opt/share/process-info)
+
+# i18n
+ADD_SUBDIRECTORY(po_lowmem)
+
+################################# End ##############################################
+
diff --git a/lowmem-popup/po_lowmem/CMakeLists.txt b/lowmem-popup/po_lowmem/CMakeLists.txt
new file mode 100644 (file)
index 0000000..099ab52
--- /dev/null
@@ -0,0 +1,24 @@
+# for i18n
+
+SET(POFILES de_DE.po el_GR.po en.po es_ES.po fr_FR.po it_IT.po ja_JP.po ko_KR.po nl_NL.po pt_PT.po ru_RU.po tr_TR.po zh_CN.po zh_HK.po zh_TW.po)
+
+SET(MSGFMT "/usr/bin/msgfmt")
+
+FOREACH(pofile ${POFILES})
+       SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})
+       MESSAGE("PO: ${pofile}")
+       GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE)
+       GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE)
+       SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo)
+       ADD_CUSTOM_COMMAND(
+                       OUTPUT ${moFile}
+                       COMMAND ${MSGFMT} -o ${moFile} ${absPofile}
+                       DEPENDS ${absPofile}
+       )
+       INSTALL(FILES ${moFile}
+                       DESTINATION /opt/apps/org.tizen.lowmem-syspopup/res/locale/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+       SET(moFiles ${moFiles} ${moFile})
+ENDFOREACH(pofile)
+
+MESSAGE(".mo files: ${moFiles}")
+ADD_CUSTOM_TARGET(po_lowmem ALL DEPENDS ${moFiles})
diff --git a/lowmem-popup/po_lowmem/de_DE.po b/lowmem-popup/po_lowmem/de_DE.po
new file mode 100755 (executable)
index 0000000..a85f8f2
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_IDLE_BODY_LOW_MEMORY"
+msgstr "Wenig Speicher übrig"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Systeminfo"
+
+msgid "IDS_IDLE_POP_PS_CLOSED"
+msgstr "%s geschlossen"
+
+msgid "IDS_COM_POP_NOT_ENOUGH_MEMORY"
+msgstr "Speicher voll"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
diff --git a/lowmem-popup/po_lowmem/el_GR.po b/lowmem-popup/po_lowmem/el_GR.po
new file mode 100755 (executable)
index 0000000..d5fe4f5
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_IDLE_BODY_LOW_MEMORY"
+msgstr "Ανεπαρκής μνήμη"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Πληρ. Συστήμ."
+
+msgid "IDS_IDLE_POP_PS_CLOSED"
+msgstr "%s έκλεισε"
+
+msgid "IDS_COM_POP_NOT_ENOUGH_MEMORY"
+msgstr "Ανεπαρκής μνήμη"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
diff --git a/lowmem-popup/po_lowmem/en.po b/lowmem-popup/po_lowmem/en.po
new file mode 100755 (executable)
index 0000000..99ed208
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_IDLE_BODY_LOW_MEMORY"
+msgstr "Low memory"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "System info"
+
+msgid "IDS_IDLE_POP_PS_CLOSED"
+msgstr "%s closed"
+
+msgid "IDS_COM_POP_NOT_ENOUGH_MEMORY"
+msgstr "Not enough memory"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
diff --git a/lowmem-popup/po_lowmem/es_ES.po b/lowmem-popup/po_lowmem/es_ES.po
new file mode 100755 (executable)
index 0000000..1d3d16e
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_IDLE_BODY_LOW_MEMORY"
+msgstr "Memoria baja"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Información del sistema"
+
+msgid "IDS_IDLE_POP_PS_CLOSED"
+msgstr "%s cerrado"
+
+msgid "IDS_COM_POP_NOT_ENOUGH_MEMORY"
+msgstr "No hay suficiente memoria"
+
+msgid "IDS_ST_SK_OK"
+msgstr "Aceptar"
diff --git a/lowmem-popup/po_lowmem/fr_FR.po b/lowmem-popup/po_lowmem/fr_FR.po
new file mode 100755 (executable)
index 0000000..e878ce9
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_IDLE_BODY_LOW_MEMORY"
+msgstr "Mémoire faible"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Infos système"
+
+msgid "IDS_IDLE_POP_PS_CLOSED"
+msgstr "%s fermé"
+
+msgid "IDS_COM_POP_NOT_ENOUGH_MEMORY"
+msgstr "Mémoire insuffisante"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
diff --git a/lowmem-popup/po_lowmem/it_IT.po b/lowmem-popup/po_lowmem/it_IT.po
new file mode 100755 (executable)
index 0000000..29d7141
--- /dev/null
@@ -0,0 +1,15 @@
+msgid "IDS_IDLE_BODY_LOW_MEMORY"
+msgstr "Memoria insufficiente"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Info sistema"
+
+msgid "IDS_IDLE_POP_PS_CLOSED"
+msgstr "%s chiuso"
+
+msgid "IDS_COM_POP_NOT_ENOUGH_MEMORY"
+msgstr "Memoria insufficiente"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
+
diff --git a/lowmem-popup/po_lowmem/ja_JP.po b/lowmem-popup/po_lowmem/ja_JP.po
new file mode 100755 (executable)
index 0000000..81ce263
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_IDLE_BODY_LOW_MEMORY"
+msgstr "メモリー​の​容量​不足​です"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "システム​情報"
+
+msgid "IDS_IDLE_POP_PS_CLOSED"
+msgstr "%s​を​終了​しました"
+
+msgid "IDS_COM_POP_NOT_ENOUGH_MEMORY"
+msgstr "メモリー不足です。"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
diff --git a/lowmem-popup/po_lowmem/ko_KR.po b/lowmem-popup/po_lowmem/ko_KR.po
new file mode 100755 (executable)
index 0000000..a99750c
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_IDLE_BODY_LOW_MEMORY"
+msgstr "배터리가 부족합니다"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "시스템 정보"
+
+msgid "IDS_IDLE_POP_PS_CLOSED"
+msgstr "%s이(가) 종료되었습니다"
+
+msgid "IDS_COM_POP_NOT_ENOUGH_MEMORY"
+msgstr "메모리가 부족합니다"
+
+msgid "IDS_ST_SK_OK"
+msgstr "확인"
diff --git a/lowmem-popup/po_lowmem/nl_NL.po b/lowmem-popup/po_lowmem/nl_NL.po
new file mode 100755 (executable)
index 0000000..4341a5c
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_IDLE_BODY_LOW_MEMORY"
+msgstr "Onvoldoende geheugen"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Systeeminfo"
+
+msgid "IDS_IDLE_POP_PS_CLOSED"
+msgstr "%s afgesloten"
+
+msgid "IDS_COM_POP_NOT_ENOUGH_MEMORY"
+msgstr "Onvoldoende geheugen"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
diff --git a/lowmem-popup/po_lowmem/pt_PT.po b/lowmem-popup/po_lowmem/pt_PT.po
new file mode 100755 (executable)
index 0000000..5912e05
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_IDLE_BODY_LOW_MEMORY"
+msgstr "Pouca memória"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Info. sist."
+
+msgid "IDS_IDLE_POP_PS_CLOSED"
+msgstr "%s fechado"
+
+msgid "IDS_COM_POP_NOT_ENOUGH_MEMORY"
+msgstr "Memória insuficiente"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
diff --git a/lowmem-popup/po_lowmem/ru_RU.po b/lowmem-popup/po_lowmem/ru_RU.po
new file mode 100755 (executable)
index 0000000..7a5c030
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_IDLE_BODY_LOW_MEMORY"
+msgstr "Аккумулятор разряжен"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Системная информация"
+
+msgid "IDS_IDLE_POP_PS_CLOSED"
+msgstr "%s закрыт"
+
+msgid "IDS_COM_POP_NOT_ENOUGH_MEMORY"
+msgstr "Недостаточно памяти"
+
+msgid "IDS_ST_SK_OK"
+msgstr "Да"
diff --git a/lowmem-popup/po_lowmem/tr_TR.po b/lowmem-popup/po_lowmem/tr_TR.po
new file mode 100755 (executable)
index 0000000..6f1fe70
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_IDLE_BODY_LOW_MEMORY"
+msgstr "Düşük hafıza"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Sistem bilgi."
+
+msgid "IDS_IDLE_POP_PS_CLOSED"
+msgstr "%s kapatıldı"
+
+msgid "IDS_COM_POP_NOT_ENOUGH_MEMORY"
+msgstr "Yeterli hafıza yok"
+
+msgid "IDS_ST_SK_OK"
+msgstr "Tamam"
diff --git a/lowmem-popup/po_lowmem/zh_CN.po b/lowmem-popup/po_lowmem/zh_CN.po
new file mode 100755 (executable)
index 0000000..59b3dbc
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_IDLE_BODY_LOW_MEMORY"
+msgstr "内存不足"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "系统信息"
+
+msgid "IDS_IDLE_POP_PS_CLOSED"
+msgstr "%s 已关闭"
+
+msgid "IDS_COM_POP_NOT_ENOUGH_MEMORY"
+msgstr "没有足够内存"
+
+msgid "IDS_ST_SK_OK"
+msgstr "确认"
diff --git a/lowmem-popup/po_lowmem/zh_HK.po b/lowmem-popup/po_lowmem/zh_HK.po
new file mode 100755 (executable)
index 0000000..a7f2f70
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_IDLE_BODY_LOW_MEMORY"
+msgstr "記憶體不足"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "系統資料"
+
+msgid "IDS_IDLE_POP_PS_CLOSED"
+msgstr "%s 已關閉"
+
+msgid "IDS_COM_POP_NOT_ENOUGH_MEMORY"
+msgstr "記憶體不足"
+
+msgid "IDS_ST_SK_OK"
+msgstr "確定"
diff --git a/lowmem-popup/po_lowmem/zh_TW.po b/lowmem-popup/po_lowmem/zh_TW.po
new file mode 100755 (executable)
index 0000000..750508d
--- /dev/null
@@ -0,0 +1,14 @@
+msgid "IDS_IDLE_BODY_LOW_MEMORY"
+msgstr "記憶體不足"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "系統訊息"
+
+msgid "IDS_IDLE_POP_PS_CLOSED"
+msgstr "%s 已關閉"
+
+msgid "IDS_COM_POP_NOT_ENOUGH_MEMORY"
+msgstr "記憶體不足"
+
+msgid "IDS_ST_SK_OK"
+msgstr "確定"
diff --git a/lowmem-popup/src/lowmem.c b/lowmem-popup/src/lowmem.c
new file mode 100644 (file)
index 0000000..1bbd35a
--- /dev/null
@@ -0,0 +1,390 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+
+#include <stdio.h>
+#include <appcore-efl.h>
+#include <sensor.h>
+#include <devman_haptic.h>
+#include <mmf/mm_sound.h>
+#include <pmapi.h>
+#include <sysman.h>
+#include "lowmem.h"
+#include <Ecore_X.h>
+#include <utilX.h>
+
+#define APPLICATION_BG         1
+#define INDICATOR_HEIGHT       (38)    /* the case of 480*800 */
+#define SOUND_PATH             "/opt/apps/org.tizen.lowmem-syspopup/res/keysound/02_Warning.wav"
+#define NEW_INDI
+
+#define ACCT_PROF
+#ifdef ACCT_PROF
+#include <sys/acct.h>
+#endif /* ACCT_PROF */
+
+static const char *process_name = NULL;
+
+#include <syspopup.h>
+
+int myterm(bundle *b, void *data)
+{
+       return 0;
+}
+
+int mytimeout(bundle *b, void *data)
+{
+       return 0;
+}
+
+syspopup_handler handler = {
+       .def_term_fn = myterm,
+       .def_timeout_fn = mytimeout
+};
+
+struct text_part {
+       char *part;
+       char *msgid;
+};
+
+static struct text_part main_txt[] = {
+       {"txt_title", N_("Low memory popup"),},
+       {"txt_mesg", N_(""),},
+};
+
+/* App Life cycle funtions */
+static void win_del(void *data, Evas_Object *obj, void *event)
+{
+       elm_exit();
+}
+
+/* Quit  */
+static void main_quit_cb(void *data, Evas_Object *obj, const char *emission,
+            const char *source)
+{
+       elm_exit();
+}
+
+/* Update text font */
+static void update_ts(Evas_Object *eo, struct text_part *tp, int size)
+{
+       int i;
+
+       if (eo == NULL || tp == NULL || size < 0)
+               return;
+
+       for (i = 0; i < size; i++) {
+               if (tp[i].part && tp[i].msgid)
+                       edje_object_part_text_set(eo, tp[i].part,
+                                       _(tp[i].msgid));
+       }
+}
+
+/* Language changed noti handler */
+static int lang_changed(void *data)
+{
+       struct appdata *ad = data;
+
+       if (ad->layout_main == NULL)
+               return 0;
+
+       update_ts(elm_layout_edje_get(ad->layout_main), main_txt,
+                 sizeof(main_txt) / sizeof(main_txt[0]));
+       return 0;
+}
+
+/* Create main window */
+static Evas_Object *create_win(const char *name)
+{
+       Evas_Object *eo;
+       int w, h;
+
+       eo = elm_win_add(NULL, name, ELM_WIN_DIALOG_BASIC);
+       if (eo) {
+               elm_win_title_set(eo, name);
+               elm_win_borderless_set(eo, EINA_TRUE);
+               evas_object_smart_callback_add(eo, "delete,request", win_del, NULL);
+               elm_win_alpha_set(eo, EINA_TRUE);
+               ecore_x_window_size_get(ecore_x_window_root_first_get(), &w,
+                                       &h);
+               evas_object_resize(eo, w, h);
+       }
+
+       return eo;
+}
+
+/* Read from EDJ file */
+static Evas_Object *load_edj(Evas_Object * parent, const char *file,
+                            const char *group)
+{
+       Evas_Object *eo;
+       int r;
+
+       eo = elm_layout_add(parent);
+       if (eo) {
+               r = elm_layout_file_set(eo, file, group);
+               if (!r) {
+                       evas_object_del(eo);
+                       return NULL;
+               }
+
+               evas_object_size_hint_weight_set(eo, EVAS_HINT_EXPAND,
+                                                EVAS_HINT_EXPAND);
+       }
+
+       return eo;
+}
+
+/* Terminate noti handler */
+static int app_terminate(void *data)
+{
+       struct appdata *ad = data;
+
+       if (ad->layout_main)
+               evas_object_del(ad->layout_main);
+
+       if (ad->win_main)
+               evas_object_del(ad->win_main);
+
+       return 0;
+}
+
+/* Pause/background */
+static int app_pause(void *data)
+{
+       return 0;
+}
+
+/* Resume */
+static int app_resume(void *data)
+{
+       return 0;
+}
+
+
+/* Reset */
+static int app_reset(bundle *b, void *data)
+{
+       struct appdata *ad = data;
+       int ret = 0;
+
+       if (syspopup_has_popup(b)) {
+               syspopup_reset(b);
+       } else {
+               ret = syspopup_create(b, &handler, ad->win_main, ad);
+               evas_object_show(ad->win_main);
+               process_name = bundle_get_val(b, "_APP_NAME_"); 
+               if (process_name == NULL)
+                       process_name = "unknown_app";
+
+               /* Start Main UI */
+               lowmem_start((void *)ad);
+       }
+
+       return 0;
+}
+
+/* Customized print */
+void system_print(const char *format, ...)
+{
+       /* Un-comment return to disable logs */
+       return;
+
+       va_list args;
+       va_start(args, format);
+       vfprintf(stderr, format, args);
+       va_end(args);
+}
+
+/* Cleanup objects to avoid mem-leak */
+void lowmem_cleanup(struct appdata *ad)
+{
+       if (ad == NULL)
+               return;
+
+       if (ad->popup)
+               evas_object_del(ad->popup);
+       if (ad->layout_main)
+               evas_object_del(ad->layout_main);
+}
+
+/* Background clicked noti */
+void bg_clicked_cb(void *data, Evas * e, Evas_Object * obj, void *event_info)
+{
+       system_print("\n system-popup : In BG Noti \n");
+       fflush(stdout);
+       exit(0);
+}
+
+void lowmem_clicked_cb(void *data, Evas * e, Evas_Object * obj,
+                      void *event_info)
+{
+       system_print("\n system-popup : Screen clicked \n");
+       fflush(stdout);
+       elm_exit();
+       exit(0);
+}
+
+/* Create indicator bar */
+int lowmem_create_indicator(struct appdata *ad)
+{
+       elm_win_indicator_mode_set(ad->win_main, ELM_WIN_INDICATOR_HIDE);
+       return 0;
+}
+
+/* Play vibration */
+int lowmem_play_vibration()
+{
+       int ret_val = 0;
+       int dev_handle = 0;
+       int mode = 0;
+
+       /* Open the haptic device */
+       dev_handle = device_haptic_open(DEV_IDX_0, mode);
+       if (dev_handle < 0)
+               return -1;
+
+       /* Play a monotone pattern for 1s */
+       ret_val = device_haptic_play_monotone(dev_handle, 1000);
+       device_haptic_close(dev_handle);
+       if (ret_val < 0)
+               return -1;
+
+       return 0;
+}
+
+void lowmem_timeout_func(void *data)
+{
+       system_print("\n System-popup : In Lowmem timeout\n");
+
+       /* Cleanup */
+       lowmem_cleanup(data);
+
+       /* Now get lost */
+       exit(0);
+}
+
+/* Basic popup widget */
+int lowmem_create_and_show_basic_popup(struct appdata *ad)
+{
+       Evas_Object *btn1;
+
+       /* Initialization */
+       char *note = (char *)malloc(MAX_PROCESS_NAME * (sizeof(char)));
+       char note_buf[MAX_PROCESS_NAME] = {0, };
+       int ret_val = 0;
+
+       if (!note) {
+               system_print("\n System-popup : can not malloc \n");
+               return -1;
+       }
+       system_print("\n System-popup : process name is %s \n", process_name);
+       snprintf(note_buf, MAX_PROCESS_NAME, _("IDS_IDLE_POP_PS_CLOSED"), process_name);
+       snprintf(note, MAX_PROCESS_NAME, "%s %s", _("IDS_COM_POP_NOT_ENOUGH_MEMORY"),note_buf);
+
+       /* Add notify */
+       /* No need to give main window, it will create internally */
+       ad->popup = elm_popup_add(ad->win_main);
+       evas_object_size_hint_weight_set(ad->popup, EVAS_HINT_EXPAND,
+                                        EVAS_HINT_EXPAND);
+       evas_object_smart_callback_add(ad->popup, "block,clicked", bg_clicked_cb, ad);
+       elm_popup_timeout_set(ad->layout_main, 3);
+       elm_object_text_set(ad->popup, note);
+       elm_object_part_text_set(ad->popup, "title,text", _("IDS_COM_BODY_SYSTEM_INFO_ABB"));
+       evas_object_smart_callback_add(ad->popup, "response", (Evas_Smart_Cb)lowmem_timeout_func, ad);
+
+       btn1 = elm_button_add(ad->popup);
+       elm_object_text_set(btn1, _("IDS_ST_SK_OK"));
+       elm_object_part_content_set(ad->popup, "button1", btn1);
+       evas_object_smart_callback_add(btn1, "clicked", bg_clicked_cb, ad);
+
+       Ecore_X_Window xwin;
+       xwin = elm_win_xwindow_get(ad->popup);
+       ecore_x_netwm_window_type_set(xwin, ECORE_X_WINDOW_TYPE_NOTIFICATION);
+       utilx_set_system_notification_level(ecore_x_display_get(), xwin, UTILX_NOTIFICATION_LEVEL_HIGH);
+       evas_object_show(ad->popup);
+
+       free(note);
+
+       return 0;
+}
+
+int lowmem_start(void *data)
+{
+       struct appdata *ad = data;
+       int ret_val = 0;
+
+       /* Create and show popup */
+       ret_val = lowmem_create_and_show_basic_popup(ad);
+       if (ret_val != 0)
+               return -1;
+
+       /* Change LCD brightness */
+       ret_val = pm_change_state(LCD_NORMAL);
+       if (ret_val != 0)
+               return -1;
+
+       /* Play vibration */
+       ret_val = lowmem_play_vibration();
+       if (ret_val == -1)
+               system_print("\n Lowmem : Play vibration failed \n");
+
+       /* Play the sound alert */
+       ret_val = mm_sound_play_keysound(SOUND_PATH, 1);
+       if (ret_val != 0)
+               system_print("\n Lowmem : Play vibration failed \n");
+
+       return 0;
+}
+
+/* App init */
+int app_create(void *data)
+{
+       Evas_Object *win;
+       struct appdata *ad = data;
+
+       /* create window */
+       win = create_win(PACKAGE);
+       if (win == NULL)
+               return -1;
+
+       ad->win_main = win;
+
+       return 0;
+
+}
+
+
+int main(int argc, char *argv[])
+{
+       struct appdata ad;
+
+       /* App life cycle management */
+       struct appcore_ops ops = {
+               .create = app_create,
+               .terminate = app_terminate,
+               .pause = app_pause,
+               .resume = app_resume,
+               .reset = app_reset,
+       };
+
+       memset(&ad, 0x0, sizeof(struct appdata));
+       ops.data = &ad;
+
+       sysconf_set_mempolicy(OOM_IGNORE);
+
+       return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
+}
diff --git a/lowmem-popup/src/lowmem.h b/lowmem-popup/src/lowmem.h
new file mode 100644 (file)
index 0000000..bb7fa88
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+
+#ifndef __DEF_lowmem_H_
+#define __DEF_lowmem_H_
+
+#include <Elementary.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#ifndef PREFIX
+#define PREFIX "/usr"
+#endif /* PREFIX */
+
+#define TEMP_DIR               "/tmp"
+#define PACKAGE                        "lowmem-popup"
+#define APPNAME                        "lowmem-popup"
+#define ICON_DIR               "/opt/apps/org.tizen.lowmem-syspopup/res/images"
+#define BG_IMAGE               TEMP_DIR"/01_popup_bg.jpg"
+#define MAIN_W                 (480)
+#define MAIN_H                 (800)
+#define EDJ_PATH               "/opt/apps/org.tizen.lowmem-syspopup/res/edje/lowmem"
+#define EDJ_NAME               EDJ_PATH"/lowmem.edj"
+#define EDJ_POPUP_NAME         EDJ_PATH"/lowmem_popup.edj"
+#define GRP_MAIN               "main"
+#define GRP_POPUP              "popup"
+#define MAX_PROCESS_NAME       100
+#define PROCESS_NAME_FILE      "/tmp/processname.txt"
+#define BEAT
+
+struct appdata {
+       Evas *evas;
+       Evas_Object *win_main;
+       Evas_Object *popup;
+
+       Evas_Object *layout_main;       /* layout widget based on EDJ */
+
+       Evas_Object *root_w;
+       Evas_Object *root_h;
+       Evas_Object *bg;
+       Evas_Object *indicator;
+
+       double w_ratio;
+       double h_ratio;
+
+};
+
+#endif                         /* __DEF_lowmem_H__ */
diff --git a/packaging/system-popup.spec b/packaging/system-popup.spec
new file mode 100644 (file)
index 0000000..28264c4
--- /dev/null
@@ -0,0 +1,93 @@
+Name:       system-popup
+Summary:    system-popup application (poweroff popup,sysevent-alert)
+Version:    0.1.7
+Release:    1
+Group:      main
+License:    Flora Software License
+Source0:    %{name}-%{version}.tar.bz2
+BuildRequires:  pkgconfig(evas)
+BuildRequires:  pkgconfig(ecore-input)
+BuildRequires:  pkgconfig(ethumb)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(efreet)
+BuildRequires:  pkgconfig(sysman)
+BuildRequires:  pkgconfig(mm-sound)
+BuildRequires:  pkgconfig(sensor)
+BuildRequires:  pkgconfig(devman_haptic)
+BuildRequires:  pkgconfig(appcore-efl)
+BuildRequires:  pkgconfig(devman)
+BuildRequires:  pkgconfig(utilX)
+BuildRequires:  pkgconfig(syspopup)
+BuildRequires:  pkgconfig(notification) 
+BuildRequires:  pkgconfig(pmapi)
+
+BuildRequires:  cmake
+BuildRequires:  edje-bin
+BuildRequires:  embryo-bin
+BuildRequires:  gettext-devel
+
+%description
+system-popup application (poweroff popup,sysevent-alert).
+
+
+%package -n org.tizen.poweroff-syspopup
+Summary:    system-popup application (poweroff popup,sysevent-alert)
+Group:      main
+
+%description -n org.tizen.poweroff-syspopup
+system-popup application (poweroff popup,sysevent-alert).
+
+%package -n org.tizen.lowmem-syspopup
+Summary:    system-popup application (lowbatt popup)
+Group:      main
+
+%description -n org.tizen.lowmem-syspopup
+system-popup application (lowbatt popup).
+
+%package -n org.tizen.lowbat-syspopup
+Summary:    system-popup application (lowmem  popup)
+Group:      main
+
+%description -n org.tizen.lowbat-syspopup
+system-popup application (lowmem  popup).
+
+
+%prep
+%setup -q 
+
+
+%build
+cmake . -DCMAKE_INSTALL_PREFIX=/usr
+make %{?jobs:-j%jobs}
+
+%install
+%make_install
+
+
+%files -n org.tizen.poweroff-syspopup
+/opt/apps/org.tizen.poweroff-syspopup/bin/poweroff-popup
+/opt/apps/org.tizen.lowbat-syspopup/res/icons/batt_full_icon.png
+/opt/share/applications/org.tizen.poweroff-syspopup.desktop
+/opt/apps/org.tizen.poweroff-syspopup/res/edje/poweroff/poweroff.edj
+/opt/apps/org.tizen.poweroff-syspopup/res/icon/org.tizen.poweroff-syspopup.png
+/opt/apps/org.tizen.poweroff-syspopup/res/locale/*/*/poweroff-popup.mo
+/opt/share/process-info/poweroff-popup.ini
+
+
+%files -n org.tizen.lowmem-syspopup
+/opt/apps/org.tizen.lowmem-syspopup/bin/lowmem-popup
+/opt/share/applications/org.tizen.lowmem-syspopup.desktop
+/opt/apps/org.tizen.lowmem-syspopup/res/edje/lowmem/lowmem.edj
+/opt/apps/org.tizen.lowmem-syspopup/res/icon/org.tizen.lowmem-syspopup.png
+/opt/apps/org.tizen.lowmem-syspopup/res/locale/*/*/lowmem-popup.mo
+/opt/share/process-info/lowmem-popup.ini
+/opt/apps/org.tizen.lowmem-syspopup/res/keysound/02_Warning.wav
+
+%files -n org.tizen.lowbat-syspopup
+/opt/apps/org.tizen.lowbat-syspopup/bin/lowbatt-popup
+/opt/share/applications/org.tizen.lowbat-syspopup.desktop
+/opt/apps/org.tizen.lowbat-syspopup/res/edje/lowbatt/lowbatt.edj
+/opt/apps/org.tizen.lowbat-syspopup/res/icon/org.tizen.lowbat-syspopup.png
+/opt/apps/org.tizen.lowbat-syspopup/res/locale/*/*/lowbatt-popup.mo
+/opt/share/process-info/lowbatt-popup.ini
+/opt/apps/org.tizen.lowbat-syspopup/res/keysound/09_Low_Battery.wav
diff --git a/poweroff-popup/CMakeLists.txt b/poweroff-popup/CMakeLists.txt
new file mode 100644 (file)
index 0000000..9aca7c4
--- /dev/null
@@ -0,0 +1,64 @@
+
+#################### Poweroff #########################
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(poweroff-popup C)
+
+SET(SRCS ${CMAKE_SOURCE_DIR}/poweroff-popup/src/poweroff.c)
+
+IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+       SET(CMAKE_BUILD_TYPE "Release")
+ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/poweroff-popup)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED appcore-efl elementary devman devman_haptic mm-sound syspopup 
+mm-keysound sysman utilX bundle pmapi evas ecore-evas notification vconf ecore-input)
+
+FOREACH(flag ${pkgs_CFLAGS})
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag} -g")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+SET(CMAKE_C_FLAGS_RELEASE "-O2 ")
+
+FIND_PROGRAM(UNAME NAMES uname)
+EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
+IF("${ARCH}" STREQUAL "arm")
+       ADD_DEFINITIONS("-DTARGET")
+       MESSAGE("add -DTARGET")
+ENDIF("${ARCH}" STREQUAL "arm")
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DSLP_DEBUG")
+
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
+
+ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
+
+ADD_CUSTOM_TARGET(poweroff.edj
+               COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/images
+               ${CMAKE_SOURCE_DIR}/edcs/poweroff.edc ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/poweroff.edj
+               DEPENDS ${CMAKE_SOURCE_DIR}/edcs/poweroff.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} poweroff.edj)
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /opt/apps/org.tizen.poweroff-syspopup/bin)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/poweroff.edj DESTINATION /opt/apps/org.tizen.poweroff-syspopup/res/edje/poweroff)
+
+# install desktop file & icon
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/data/org.tizen.poweroff-syspopup.desktop.in ${CMAKE_SOURCE_DIR}/data/org.tizen.poweroff-syspopup.desktop)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/org.tizen.poweroff-syspopup.desktop DESTINATION /opt/share/applications/)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/org.tizen.poweroff-syspopup.png DESTINATION /opt/apps/org.tizen.poweroff-syspopup/res/icon)
+
+# install ini file
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/${PROJECT_NAME}.ini DESTINATION /opt/share/process-info)
+
+# i18n
+ADD_SUBDIRECTORY(po_poweroff)
+
diff --git a/poweroff-popup/po_poweroff/CMakeLists.txt b/poweroff-popup/po_poweroff/CMakeLists.txt
new file mode 100644 (file)
index 0000000..bfd14f1
--- /dev/null
@@ -0,0 +1,24 @@
+# for i18n
+
+SET(POFILES de_DE.po el_GR.po en.po es_ES.po fr_FR.po it_IT.po ja_JP.po ko_KR.po nl_NL.po pt_PT.po ru_RU.po tr_TR.po zh_CN.po zh_HK.po zh_TW.po)
+
+SET(MSGFMT "/usr/bin/msgfmt")
+
+FOREACH(pofile ${POFILES})
+       SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})
+       MESSAGE("PO: ${pofile}")
+       GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE)
+       GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE)
+       SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo)
+       ADD_CUSTOM_COMMAND(
+                       OUTPUT ${moFile}
+                       COMMAND ${MSGFMT} -o ${moFile} ${absPofile}
+                       DEPENDS ${absPofile}
+       )
+       INSTALL(FILES ${moFile}
+                       DESTINATION /opt/apps/org.tizen.poweroff-syspopup/res/locale/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+       SET(moFiles ${moFiles} ${moFile})
+ENDFOREACH(pofile)
+
+MESSAGE(".mo files: ${moFiles}")
+ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})
diff --git a/poweroff-popup/po_poweroff/de_DE.po b/poweroff-popup/po_poweroff/de_DE.po
new file mode 100755 (executable)
index 0000000..ca5a080
--- /dev/null
@@ -0,0 +1,45 @@
+msgid "IDS_ST_BODY_POWER_OFF"
+msgstr "Ausschalten"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
+
+msgid "IDS_ST_BODY_SLEEP"
+msgstr "Schlafen"
+
+msgid "IDS_COM_SK_CANCEL"
+msgstr "Abbrechen"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Systeminfo"
+
+msgid "IDS_CLOG_SK_CANCEL_LITE"
+msgstr "Abbrech."
+
+msgid "IDS_ST_MBODY_SCREEN_READER_HTTS"
+msgstr "Bildschirm-Reader (TTS)"
+
+msgid "IDS_ST_HEADER_ACCESSIBILITY"
+msgstr "Eingabehilfe"
+
+msgid "IDS_ST_BODY_DISABLE_NEGATIVE_COLOURS"
+msgstr "Negativfarben deaktivieren"
+
+msgid "IDS_ST_BODY_ENABLE_NEGATIVE_COLOURS"
+msgstr "Negativfarben aktivieren"
+
+msgid "IDS_ST_BODY_DISABLE_ZOOM"
+msgstr "Zoom deaktivieren"
+
+msgid "IDS_ST_BODY_ENABLE_ZOOM"
+msgstr "Zoom aktivieren"
+
+msgid "IDS_ST_BODY_TURN_ON_ASSISTIVE_LIGHT"
+msgstr "Hilfsbeleuchtung einschalten"
+
+msgid "IDS_ST_BODY_TURN_OFF_ASSISTIVE_LIGHT"
+msgstr "Hilfsbeleuchtung ausschalten"
+
+msgid "IDS_COM_BODY_PHONE_OPTIONS"
+msgstr "Telefonoptionen"
+
diff --git a/poweroff-popup/po_poweroff/el_GR.po b/poweroff-popup/po_poweroff/el_GR.po
new file mode 100755 (executable)
index 0000000..189906d
--- /dev/null
@@ -0,0 +1,45 @@
+msgid "IDS_ST_BODY_POWER_OFF"
+msgstr "Απενεργοποίηση"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
+
+msgid "IDS_ST_BODY_SLEEP"
+msgstr "Ύπνος"
+
+msgid "IDS_COM_SK_CANCEL"
+msgstr "Άκυρο"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Πληρ. Συστήμ."
+
+msgid "IDS_CLOG_SK_CANCEL_LITE"
+msgstr "Ακύρωση"
+
+msgid "IDS_ST_MBODY_SCREEN_READER_HTTS"
+msgstr "Λόγος πλευρ. οθ."
+
+msgid "IDS_ST_HEADER_ACCESSIBILITY"
+msgstr "Προσβασιμότητα"
+
+msgid "IDS_ST_BODY_DISABLE_NEGATIVE_COLOURS"
+msgstr "Απενεργοποίηση αρνητικών χρωμάτων"
+
+msgid "IDS_ST_BODY_ENABLE_NEGATIVE_COLOURS"
+msgstr "Ενεργοποίηση αρνητικών χρωμάτων"
+
+msgid "IDS_ST_BODY_DISABLE_ZOOM"
+msgstr "Απενεργοποίηση του ζουμ"
+
+msgid "IDS_ST_BODY_ENABLE_ZOOM"
+msgstr "Ενεργοποίηση του ζουμ"
+
+msgid "IDS_ST_BODY_TURN_ON_ASSISTIVE_LIGHT"
+msgstr "Ενεργοποίηση του βοηθητικού φωτός"
+
+msgid "IDS_ST_BODY_TURN_OFF_ASSISTIVE_LIGHT"
+msgstr "Απενεργοποίηση του βοηθητικού φωτός"
+
+msgid "IDS_COM_BODY_PHONE_OPTIONS"
+msgstr "Επιλογές τηλεφώνου"
+
diff --git a/poweroff-popup/po_poweroff/en.po b/poweroff-popup/po_poweroff/en.po
new file mode 100755 (executable)
index 0000000..7294dd0
--- /dev/null
@@ -0,0 +1,45 @@
+msgid "IDS_ST_BODY_POWER_OFF"
+msgstr "Power off"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
+
+msgid "IDS_ST_BODY_SLEEP"
+msgstr "Sleep"
+
+msgid "IDS_COM_SK_CANCEL"
+msgstr "Cancel"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "System info"
+
+msgid "IDS_CLOG_SK_CANCEL_LITE"
+msgstr "Cancel"
+
+msgid "IDS_ST_MBODY_SCREEN_READER_HTTS"
+msgstr "Screen reader (TTS)"
+
+msgid "IDS_ST_HEADER_ACCESSIBILITY"
+msgstr "Accessibility"
+
+msgid "IDS_ST_BODY_DISABLE_NEGATIVE_COLOURS"
+msgstr "Disable negative colours"
+
+msgid "IDS_ST_BODY_ENABLE_NEGATIVE_COLOURS"
+msgstr "Enable negative colours"
+
+msgid "IDS_ST_BODY_DISABLE_ZOOM"
+msgstr "Disable zoom"
+
+msgid "IDS_ST_BODY_ENABLE_ZOOM"
+msgstr "Enable zoom"
+
+msgid "IDS_ST_BODY_TURN_ON_ASSISTIVE_LIGHT"
+msgstr "Turn on assistive light"
+
+msgid "IDS_ST_BODY_TURN_OFF_ASSISTIVE_LIGHT"
+msgstr "Turn off assistive light"
+
+msgid "IDS_COM_BODY_PHONE_OPTIONS"
+msgstr "Phone options"
+
diff --git a/poweroff-popup/po_poweroff/es_ES.po b/poweroff-popup/po_poweroff/es_ES.po
new file mode 100755 (executable)
index 0000000..7ce9f5b
--- /dev/null
@@ -0,0 +1,44 @@
+msgid "IDS_ST_BODY_POWER_OFF"
+msgstr "Apagar"
+
+msgid "IDS_ST_SK_OK"
+msgstr "Aceptar"
+
+msgid "IDS_ST_BODY_SLEEP"
+msgstr "Suspender"
+
+msgid "IDS_COM_SK_CANCEL"
+msgstr "Cancelar"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Información del sistema"
+
+msgid "IDS_CLOG_SK_CANCEL_LITE"
+msgstr "Cancelar"
+
+msgid "IDS_ST_MBODY_SCREEN_READER_HTTS"
+msgstr "Lector de pantalla (TTS)"
+
+msgid "IDS_ST_HEADER_ACCESSIBILITY"
+msgstr "Accesibilidad"
+
+msgid "IDS_ST_BODY_DISABLE_NEGATIVE_COLOURS"
+msgstr "Desactivar colores negativos"
+
+msgid "IDS_ST_BODY_ENABLE_NEGATIVE_COLOURS"
+msgstr "Activar colores negativos"
+
+msgid "IDS_ST_BODY_DISABLE_ZOOM"
+msgstr "Desactivar zoom"
+
+msgid "IDS_ST_BODY_ENABLE_ZOOM"
+msgstr "Activar zoom"
+
+msgid "IDS_ST_BODY_TURN_ON_ASSISTIVE_LIGHT"
+msgstr "Encender luz de asistencia"
+
+msgid "IDS_ST_BODY_TURN_OFF_ASSISTIVE_LIGHT"
+msgstr "Apagar luz de asistencia"
+
+msgid "IDS_COM_BODY_PHONE_OPTIONS"
+msgstr "Opciones del teléfono"
diff --git a/poweroff-popup/po_poweroff/fr_FR.po b/poweroff-popup/po_poweroff/fr_FR.po
new file mode 100755 (executable)
index 0000000..4b470a0
--- /dev/null
@@ -0,0 +1,44 @@
+msgid "IDS_ST_BODY_POWER_OFF"
+msgstr "Éteindre"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
+
+msgid "IDS_ST_BODY_SLEEP"
+msgstr "Sommeil"
+
+msgid "IDS_COM_SK_CANCEL"
+msgstr "Annuler"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Infos système"
+
+msgid "IDS_CLOG_SK_CANCEL_LITE"
+msgstr "Annuler"
+
+msgid "IDS_ST_MBODY_SCREEN_READER_HTTS"
+msgstr "Lecteur d'écran (TTS)"
+
+msgid "IDS_ST_HEADER_ACCESSIBILITY"
+msgstr "Accessibilité"
+
+msgid "IDS_ST_BODY_DISABLE_NEGATIVE_COLOURS"
+msgstr "Désactiver les couleurs négatives"
+
+msgid "IDS_ST_BODY_ENABLE_NEGATIVE_COLOURS"
+msgstr "Activer les couleurs négatives"
+
+msgid "IDS_ST_BODY_DISABLE_ZOOM"
+msgstr "Désactiver le zoom"
+
+msgid "IDS_ST_BODY_ENABLE_ZOOM"
+msgstr "Activer le zoom"
+
+msgid "IDS_ST_BODY_TURN_ON_ASSISTIVE_LIGHT"
+msgstr "Activer la lumière d'assistance"
+
+msgid "IDS_ST_BODY_TURN_OFF_ASSISTIVE_LIGHT"
+msgstr "Désactiver la lumière d'assistance"
+
+msgid "IDS_COM_BODY_PHONE_OPTIONS"
+msgstr "Options du téléphone"
diff --git a/poweroff-popup/po_poweroff/it_IT.po b/poweroff-popup/po_poweroff/it_IT.po
new file mode 100755 (executable)
index 0000000..b6ef8cc
--- /dev/null
@@ -0,0 +1,44 @@
+msgid "IDS_ST_BODY_POWER_OFF"
+msgstr "Spegnimento"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
+
+msgid "IDS_ST_BODY_SLEEP"
+msgstr "Dormire"
+
+msgid "IDS_COM_SK_CANCEL"
+msgstr "Annulla"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Info sistema"
+
+msgid "IDS_CLOG_SK_CANCEL_LITE"
+msgstr "Annulla"
+
+msgid "IDS_ST_MBODY_SCREEN_READER_HTTS"
+msgstr "Lettura schermo (TTS)"
+
+msgid "IDS_ST_HEADER_ACCESSIBILITY"
+msgstr "Accessibilità"
+
+msgid "IDS_ST_BODY_DISABLE_NEGATIVE_COLOURS"
+msgstr "Disattiva negativo"
+
+msgid "IDS_ST_BODY_ENABLE_NEGATIVE_COLOURS"
+msgstr "Attiva negativo"
+
+msgid "IDS_ST_BODY_DISABLE_ZOOM"
+msgstr "Disattiva zoom"
+
+msgid "IDS_ST_BODY_ENABLE_ZOOM"
+msgstr "Attiva zoom"
+
+msgid "IDS_ST_BODY_TURN_ON_ASSISTIVE_LIGHT"
+msgstr "Accendi luce di accesso facilitato"
+
+msgid "IDS_ST_BODY_TURN_OFF_ASSISTIVE_LIGHT"
+msgstr "Spegni luce di accesso facilitato"
+
+msgid "IDS_COM_BODY_PHONE_OPTIONS"
+msgstr "Opzioni telefono"
diff --git a/poweroff-popup/po_poweroff/ja_JP.po b/poweroff-popup/po_poweroff/ja_JP.po
new file mode 100755 (executable)
index 0000000..2d41534
--- /dev/null
@@ -0,0 +1,44 @@
+msgid "IDS_ST_BODY_POWER_OFF"
+msgstr "電源OFF"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
+
+msgid "IDS_ST_BODY_SLEEP"
+msgstr "スリープ"
+
+msgid "IDS_COM_SK_CANCEL"
+msgstr "キャンセル"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "システム​情報"
+
+msgid "IDS_CLOG_SK_CANCEL_LITE"
+msgstr "取消"
+
+msgid "IDS_ST_MBODY_SCREEN_READER_HTTS"
+msgstr "スクリーンリーダー(TTS)"
+
+msgid "IDS_ST_HEADER_ACCESSIBILITY"
+msgstr "ユーザー補助"
+
+msgid "IDS_ST_BODY_DISABLE_NEGATIVE_COLOURS"
+msgstr "ネガティブカラーを無効"
+
+msgid "IDS_ST_BODY_ENABLE_NEGATIVE_COLOURS"
+msgstr "ネガティブカラーを有効"
+
+msgid "IDS_ST_BODY_DISABLE_ZOOM"
+msgstr "ズームを無効"
+
+msgid "IDS_ST_BODY_ENABLE_ZOOM"
+msgstr "ズームを有効"
+
+msgid "IDS_ST_BODY_TURN_ON_ASSISTIVE_LIGHT"
+msgstr "補助ライトをON"
+
+msgid "IDS_ST_BODY_TURN_OFF_ASSISTIVE_LIGHT"
+msgstr "補助ライトをOFF"
+
+msgid "IDS_COM_BODY_PHONE_OPTIONS"
+msgstr "端末オプション"
diff --git a/poweroff-popup/po_poweroff/ko_KR.po b/poweroff-popup/po_poweroff/ko_KR.po
new file mode 100755 (executable)
index 0000000..9bb0133
--- /dev/null
@@ -0,0 +1,44 @@
+msgid "IDS_ST_BODY_POWER_OFF"
+msgstr "종료"
+
+msgid "IDS_ST_SK_OK"
+msgstr "확인"
+
+msgid "IDS_ST_BODY_SLEEP"
+msgstr "잠자는 중"
+
+msgid "IDS_COM_SK_CANCEL"
+msgstr "취소"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "시스템 정보"
+
+msgid "IDS_CLOG_SK_CANCEL_LITE"
+msgstr "취소"
+
+msgid "IDS_ST_MBODY_SCREEN_READER_HTTS"
+msgstr "스크린 리더(TTS)"
+
+msgid "IDS_ST_HEADER_ACCESSIBILITY"
+msgstr "접근성"
+
+msgid "IDS_ST_BODY_DISABLE_NEGATIVE_COLOURS"
+msgstr "색상 반전 해제"
+
+msgid "IDS_ST_BODY_ENABLE_NEGATIVE_COLOURS"
+msgstr "색상 반전 실행"
+
+msgid "IDS_ST_BODY_DISABLE_ZOOM"
+msgstr "확대/축소 해제"
+
+msgid "IDS_ST_BODY_ENABLE_ZOOM"
+msgstr "확대/축소 실행"
+
+msgid "IDS_ST_BODY_TURN_ON_ASSISTIVE_LIGHT"
+msgstr "보조 조명 켜기"
+
+msgid "IDS_ST_BODY_TURN_OFF_ASSISTIVE_LIGHT"
+msgstr "보조 조명 끄기"
+
+msgid "IDS_COM_BODY_PHONE_OPTIONS"
+msgstr "휴대폰 옵션"
diff --git a/poweroff-popup/po_poweroff/nl_NL.po b/poweroff-popup/po_poweroff/nl_NL.po
new file mode 100755 (executable)
index 0000000..1261a82
--- /dev/null
@@ -0,0 +1,44 @@
+msgid "IDS_ST_BODY_POWER_OFF"
+msgstr "Uitschakelen"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
+
+msgid "IDS_ST_BODY_SLEEP"
+msgstr "Slapen"
+
+msgid "IDS_COM_SK_CANCEL"
+msgstr "Annuleren"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Systeeminfo"
+
+msgid "IDS_CLOG_SK_CANCEL_LITE"
+msgstr "Annul."
+
+msgid "IDS_ST_MBODY_SCREEN_READER_HTTS"
+msgstr "Schermlezer (TTS)"
+
+msgid "IDS_ST_HEADER_ACCESSIBILITY"
+msgstr "Toegankelijkheid"
+
+msgid "IDS_ST_BODY_DISABLE_NEGATIVE_COLOURS"
+msgstr "Negatieve kleuren uitschakelen"
+
+msgid "IDS_ST_BODY_ENABLE_NEGATIVE_COLOURS"
+msgstr "Negatieve kleuren inschakelen"
+
+msgid "IDS_ST_BODY_DISABLE_ZOOM"
+msgstr "Zoomen uitschakelen"
+
+msgid "IDS_ST_BODY_ENABLE_ZOOM"
+msgstr "Zoomen inschakelen"
+
+msgid "IDS_ST_BODY_TURN_ON_ASSISTIVE_LIGHT"
+msgstr "Hulpverlichting inschakelen"
+
+msgid "IDS_ST_BODY_TURN_OFF_ASSISTIVE_LIGHT"
+msgstr "Hulpverlichting uitschakelen"
+
+msgid "IDS_COM_BODY_PHONE_OPTIONS"
+msgstr "Telefoonopties"
diff --git a/poweroff-popup/po_poweroff/pt_PT.po b/poweroff-popup/po_poweroff/pt_PT.po
new file mode 100755 (executable)
index 0000000..0a1e2ae
--- /dev/null
@@ -0,0 +1,45 @@
+msgid "IDS_ST_BODY_POWER_OFF"
+msgstr "Desligar"
+
+msgid "IDS_ST_SK_OK"
+msgstr "OK"
+
+msgid "IDS_ST_BODY_SLEEP"
+msgstr "Dormir"
+
+msgid "IDS_COM_SK_CANCEL"
+msgstr "Cancelar"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Info. sist."
+
+msgid "IDS_CLOG_SK_CANCEL_LITE"
+msgstr "Canc."
+
+msgid "IDS_ST_MBODY_SCREEN_READER_HTTS"
+msgstr "Leitor de ecrã (TTS)"
+
+msgid "IDS_ST_HEADER_ACCESSIBILITY"
+msgstr "Acessibilidade"
+
+msgid "IDS_ST_BODY_DISABLE_NEGATIVE_COLOURS"
+msgstr "Desactivar cores negativas"
+
+msgid "IDS_ST_BODY_ENABLE_NEGATIVE_COLOURS"
+msgstr "Activar cores negativas"
+
+msgid "IDS_ST_BODY_DISABLE_ZOOM"
+msgstr "Desactivar zoom"
+
+msgid "IDS_ST_BODY_ENABLE_ZOOM"
+msgstr "Activar zoom"
+
+msgid "IDS_ST_BODY_TURN_ON_ASSISTIVE_LIGHT"
+msgstr "Ligar luz auxiliar"
+
+msgid "IDS_ST_BODY_TURN_OFF_ASSISTIVE_LIGHT"
+msgstr "Desligar luz auxiliar"
+
+msgid "IDS_COM_BODY_PHONE_OPTIONS"
+msgstr "Opções de telefone"
+
diff --git a/poweroff-popup/po_poweroff/ru_RU.po b/poweroff-popup/po_poweroff/ru_RU.po
new file mode 100755 (executable)
index 0000000..6dd96ac
--- /dev/null
@@ -0,0 +1,45 @@
+msgid "IDS_ST_BODY_POWER_OFF"
+msgstr "Выключение телефона"
+
+msgid "IDS_ST_SK_OK"
+msgstr "Да"
+
+msgid "IDS_ST_BODY_SLEEP"
+msgstr "Сон"
+
+msgid "IDS_COM_SK_CANCEL"
+msgstr "Отмена"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Системная информация"
+
+msgid "IDS_CLOG_SK_CANCEL_LITE"
+msgstr "Отмена"
+
+msgid "IDS_ST_MBODY_SCREEN_READER_HTTS"
+msgstr "Чтение с экрана (TTS)"
+
+msgid "IDS_ST_HEADER_ACCESSIBILITY"
+msgstr "Специальные возможности"
+
+msgid "IDS_ST_BODY_DISABLE_NEGATIVE_COLOURS"
+msgstr "Отключить негатив"
+
+msgid "IDS_ST_BODY_ENABLE_NEGATIVE_COLOURS"
+msgstr "Включить негатив"
+
+msgid "IDS_ST_BODY_DISABLE_ZOOM"
+msgstr "Отключить увеличение"
+
+msgid "IDS_ST_BODY_ENABLE_ZOOM"
+msgstr "Включить увеличение"
+
+msgid "IDS_ST_BODY_TURN_ON_ASSISTIVE_LIGHT"
+msgstr "Включить подсветку"
+
+msgid "IDS_ST_BODY_TURN_OFF_ASSISTIVE_LIGHT"
+msgstr "Отключить подсветку"
+
+msgid "IDS_COM_BODY_PHONE_OPTIONS"
+msgstr "Параметры телефона"
+
diff --git a/poweroff-popup/po_poweroff/tr_TR.po b/poweroff-popup/po_poweroff/tr_TR.po
new file mode 100755 (executable)
index 0000000..45f2c38
--- /dev/null
@@ -0,0 +1,44 @@
+msgid "IDS_ST_BODY_POWER_OFF"
+msgstr "Kapat"
+
+msgid "IDS_ST_SK_OK"
+msgstr "Tamam"
+
+msgid "IDS_ST_BODY_SLEEP"
+msgstr "Uyku"
+
+msgid "IDS_COM_SK_CANCEL"
+msgstr "İptal"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "Sistem bilgi."
+
+msgid "IDS_CLOG_SK_CANCEL_LITE"
+msgstr "İptal"
+
+msgid "IDS_ST_MBODY_SCREEN_READER_HTTS"
+msgstr "Ekran okuyucu (TTS)"
+
+msgid "IDS_ST_HEADER_ACCESSIBILITY"
+msgstr "Erişebilirlik"
+
+msgid "IDS_ST_BODY_DISABLE_NEGATIVE_COLOURS"
+msgstr "Negatif renkleri devre dışı bırak"
+
+msgid "IDS_ST_BODY_ENABLE_NEGATIVE_COLOURS"
+msgstr "Negatif renkleri etkinleştir"
+
+msgid "IDS_ST_BODY_DISABLE_ZOOM"
+msgstr "Zoom'u devre dışı bırak"
+
+msgid "IDS_ST_BODY_ENABLE_ZOOM"
+msgstr "Zoom'u etkinleştir"
+
+msgid "IDS_ST_BODY_TURN_ON_ASSISTIVE_LIGHT"
+msgstr "Yardımcı ışığı aç"
+
+msgid "IDS_ST_BODY_TURN_OFF_ASSISTIVE_LIGHT"
+msgstr "Yardımcı ışığı kapat"
+
+msgid "IDS_COM_BODY_PHONE_OPTIONS"
+msgstr "Telefon seçenekleri"
diff --git a/poweroff-popup/po_poweroff/zh_CN.po b/poweroff-popup/po_poweroff/zh_CN.po
new file mode 100755 (executable)
index 0000000..99a73d9
--- /dev/null
@@ -0,0 +1,45 @@
+msgid "IDS_ST_BODY_POWER_OFF"
+msgstr "关机"
+
+msgid "IDS_ST_SK_OK"
+msgstr "确认"
+
+msgid "IDS_ST_BODY_SLEEP"
+msgstr "休眠"
+
+msgid "IDS_COM_SK_CANCEL"
+msgstr "取消"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "系统信息"
+
+msgid "IDS_CLOG_SK_CANCEL_LITE"
+msgstr "取消"
+
+msgid "IDS_ST_MBODY_SCREEN_READER_HTTS"
+msgstr "屏幕读取器(TTS)"
+
+msgid "IDS_ST_HEADER_ACCESSIBILITY"
+msgstr "辅助功能"
+
+msgid "IDS_ST_BODY_DISABLE_NEGATIVE_COLOURS"
+msgstr "禁用负色"
+
+msgid "IDS_ST_BODY_ENABLE_NEGATIVE_COLOURS"
+msgstr "启用负色"
+
+msgid "IDS_ST_BODY_DISABLE_ZOOM"
+msgstr "禁用缩放"
+
+msgid "IDS_ST_BODY_ENABLE_ZOOM"
+msgstr "启用缩放"
+
+msgid "IDS_ST_BODY_TURN_ON_ASSISTIVE_LIGHT"
+msgstr "开启辅助光"
+
+msgid "IDS_ST_BODY_TURN_OFF_ASSISTIVE_LIGHT"
+msgstr "关闭辅助光"
+
+msgid "IDS_COM_BODY_PHONE_OPTIONS"
+msgstr "手机选项"
+
diff --git a/poweroff-popup/po_poweroff/zh_HK.po b/poweroff-popup/po_poweroff/zh_HK.po
new file mode 100755 (executable)
index 0000000..83baf3e
--- /dev/null
@@ -0,0 +1,45 @@
+msgid "IDS_ST_BODY_POWER_OFF"
+msgstr "關機"
+
+msgid "IDS_ST_SK_OK"
+msgstr "確定"
+
+msgid "IDS_ST_BODY_SLEEP"
+msgstr "睡眠"
+
+msgid "IDS_COM_SK_CANCEL"
+msgstr "取消"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "系統資料"
+
+msgid "IDS_CLOG_SK_CANCEL_LITE"
+msgstr "取消"
+
+msgid "IDS_ST_MBODY_SCREEN_READER_HTTS"
+msgstr "螢幕閱讀器 (TTS)"
+
+msgid "IDS_ST_HEADER_ACCESSIBILITY"
+msgstr "協助工具"
+
+msgid "IDS_ST_BODY_DISABLE_NEGATIVE_COLOURS"
+msgstr "停用負色"
+
+msgid "IDS_ST_BODY_ENABLE_NEGATIVE_COLOURS"
+msgstr "啟用負色"
+
+msgid "IDS_ST_BODY_DISABLE_ZOOM"
+msgstr "停用縮放"
+
+msgid "IDS_ST_BODY_ENABLE_ZOOM"
+msgstr "啟用縮放"
+
+msgid "IDS_ST_BODY_TURN_ON_ASSISTIVE_LIGHT"
+msgstr "開啟輔助燈"
+
+msgid "IDS_ST_BODY_TURN_OFF_ASSISTIVE_LIGHT"
+msgstr "關閉輔助燈"
+
+msgid "IDS_COM_BODY_PHONE_OPTIONS"
+msgstr "手機選項"
+
diff --git a/poweroff-popup/po_poweroff/zh_TW.po b/poweroff-popup/po_poweroff/zh_TW.po
new file mode 100755 (executable)
index 0000000..fef8ea7
--- /dev/null
@@ -0,0 +1,45 @@
+msgid "IDS_ST_BODY_POWER_OFF"
+msgstr "電源關閉"
+
+msgid "IDS_ST_SK_OK"
+msgstr "確定"
+
+msgid "IDS_ST_BODY_SLEEP"
+msgstr "睡眠"
+
+msgid "IDS_COM_SK_CANCEL"
+msgstr "取消"
+
+msgid "IDS_COM_BODY_SYSTEM_INFO_ABB"
+msgstr "系統訊息"
+
+msgid "IDS_CLOG_SK_CANCEL_LITE"
+msgstr "取消"
+
+msgid "IDS_ST_MBODY_SCREEN_READER_HTTS"
+msgstr "螢幕讀取軟體 (TTS)"
+
+msgid "IDS_ST_HEADER_ACCESSIBILITY"
+msgstr "協助工具"
+
+msgid "IDS_ST_BODY_DISABLE_NEGATIVE_COLOURS"
+msgstr "停用負色"
+
+msgid "IDS_ST_BODY_ENABLE_NEGATIVE_COLOURS"
+msgstr "啟用負色"
+
+msgid "IDS_ST_BODY_DISABLE_ZOOM"
+msgstr "停用縮放"
+
+msgid "IDS_ST_BODY_ENABLE_ZOOM"
+msgstr "啟用縮放"
+
+msgid "IDS_ST_BODY_TURN_ON_ASSISTIVE_LIGHT"
+msgstr "開啟輔助燈光"
+
+msgid "IDS_ST_BODY_TURN_OFF_ASSISTIVE_LIGHT"
+msgstr "關閉輔助燈光"
+
+msgid "IDS_COM_BODY_PHONE_OPTIONS"
+msgstr "手機選項"
+
diff --git a/poweroff-popup/src/poweroff.c b/poweroff-popup/src/poweroff.c
new file mode 100755 (executable)
index 0000000..3e077fe
--- /dev/null
@@ -0,0 +1,372 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+
+#include <stdio.h>
+#include <appcore-efl.h>
+#include <sensor.h>
+#include <devman.h>
+#include <devman_haptic.h>
+#include <pmapi.h>
+#include <sysman.h>
+#include "poweroff.h"
+
+#include <Ecore_X.h>
+#include <Ecore_Input.h>
+#include <utilX.h>
+
+/* Time profiling support */
+#ifdef ACCT_PROF
+#include <sys/acct.h>
+#endif /* ACCT_PROF */
+
+#include <syspopup.h>
+#include <vconf.h>
+
+int create_and_show_basic_popup_min(struct appdata *ad);
+void poweroff_response_yes_cb_min(void *data, Evas_Object * obj, void *event_info);
+void poweroff_response_no_cb_min(void *data, Evas_Object * obj, void *event_info);
+
+
+int myterm(bundle *b, void *data)
+{
+       return 0;
+}
+
+int mytimeout(bundle *b, void *data)
+{
+       return 0;
+}
+
+syspopup_handler handler = {
+       .def_term_fn = myterm,
+       .def_timeout_fn = mytimeout
+};
+
+/* App Life cycle funtions */
+static void win_del(void *data, Evas_Object * obj, void *event)
+{
+       elm_exit();
+}
+
+/* Quit  */
+static void main_quit_cb(void *data, Evas_Object * obj, const char *emission,
+                        const char *source)
+{
+       elm_exit();
+}
+
+/* Update text font */
+static void update_ts(Evas_Object * eo, struct text_part *tp, int size)
+{
+       int i;
+
+       if (eo == NULL || tp == NULL || size < 0)
+               return;
+
+       for (i = 0; i < size; i++) {
+               if (tp[i].part && tp[i].msgid)
+                       edje_object_part_text_set(eo, tp[i].part,
+                                                 _(tp[i].msgid));
+       }
+}
+
+/* Language changed noti handler */
+static int lang_changed(void *data)
+{
+       struct appdata *ad = data;
+
+       if (ad->layout_main == NULL)
+               return 0;
+
+       update_ts(elm_layout_edje_get(ad->layout_main), main_txt,
+                 sizeof(main_txt) / sizeof(main_txt[0]));
+       return 0;
+}
+
+/* Create main window */
+static Evas_Object *create_win(const char *name)
+{
+       Evas_Object *eo;
+       int w, h;
+
+       eo = elm_win_add(NULL, name, ELM_WIN_DIALOG_BASIC);
+       if (eo) {
+               elm_win_title_set(eo, name);
+               elm_win_borderless_set(eo, EINA_TRUE);
+               evas_object_smart_callback_add(eo, "delete,request", win_del, NULL);
+               elm_win_alpha_set(eo, EINA_TRUE);
+               ecore_x_window_size_get(ecore_x_window_root_first_get(), &w,
+                                       &h);
+               evas_object_resize(eo, w, h);
+       }
+
+       return eo;
+}
+
+/* Read from EDJ file */
+static Evas_Object *load_edj(Evas_Object * parent, const char *file,
+                            const char *group)
+{
+       Evas_Object *eo;
+       int r;
+
+       eo = elm_layout_add(parent);
+       if (eo) {
+               r = elm_layout_file_set(eo, file, group);
+               if (!r) {
+                       evas_object_del(eo);
+                       return NULL;
+               }
+
+               evas_object_size_hint_weight_set(eo, EVAS_HINT_EXPAND,
+                                                EVAS_HINT_EXPAND);
+       }
+
+       return eo;
+}
+
+/* Terminate noti handler */
+static int app_terminate(void *data)
+{
+       struct appdata *ad = data;
+
+       if (ad->layout_main)
+               evas_object_del(ad->layout_main);
+
+       if (ad->win_main)
+               evas_object_del(ad->win_main);
+
+       return 0;
+}
+
+/* Pause/background */
+static int app_pause(void *data)
+{
+       return 0;
+}
+
+/* Resume */
+static int app_resume(void *data)
+{
+       return 0;
+}
+
+
+/* Reset */
+static int app_reset(bundle *b, void *data)
+{
+       struct appdata *ad = data;
+
+       if (syspopup_has_popup(b)) {
+               syspopup_reset(b);
+       } else {
+               syspopup_create(b, &handler, ad->win_main, ad);
+               evas_object_show(ad->win_main);
+
+               /* Start Main UI */
+               poweroff_start((void *)ad);
+       }
+
+       return 0;
+}
+
+/* Customized print */
+void system_print(const char *format, ...)
+{
+       /* Un-comment return to disable logs */
+       return;
+
+       va_list args;
+       va_start(args, format);
+       vfprintf(stderr, format, args);
+       va_end(args);
+}
+
+/* Cleanup objects to avoid mem-leak */
+void poweroff_cleanup(struct appdata *ad)
+{
+       if (ad->popup)
+               evas_object_del(ad->popup);
+       if (ad->layout_main)
+               evas_object_del(ad->layout_main);
+}
+
+/* Background clicked noti */
+static void bg_clicked_cb(void *data, Evas * e, Evas_Object * obj, void *event_info)
+{
+       system_print("\n system-popup : In BG Noti \n");
+       fflush(stdout);
+       exit(0);
+}
+
+void poweroff_response_yes_cb_min(void *data, Evas_Object * obj, void *event_info)
+{
+       system_print("System-popup : Switching off phone !! Bye Bye \n");
+
+       /* This will cleanup the memory */
+       poweroff_cleanup(data);
+
+       /* Sysman API to poweroff */
+       if (sysman_call_predef_action(PREDEF_POWEROFF, 0) == -1) {
+               system_print("System-popup : failed to request poweroff to system_server \n");
+               system("poweroff");
+       }
+       exit(0);
+}
+
+void poweroff_response_no_cb_min(void *data, Evas_Object * obj, void *event_info)
+{
+       system_print("\nSystem-popup: Option is Wrong");
+       if(data != NULL)
+               poweroff_cleanup(data);
+       exit(0);
+}
+
+int create_and_show_basic_popup_min(struct appdata *ad)
+{
+       Evas_Object *btn1;
+       Evas_Object *btn2;
+
+       ad->popup_poweroff = elm_popup_add(ad->win_main);
+       if (ad->popup_poweroff == NULL) {
+               system_print("\n System-popup : Add popup failed \n");
+               return -1;
+       }
+
+       evas_object_size_hint_weight_set(ad->popup_poweroff, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_object_text_set(ad->popup_poweroff, _("IDS_ST_BODY_POWER_OFF"));
+       elm_object_part_text_set(ad->popup_poweroff, "title,text", _("IDS_COM_BODY_SYSTEM_INFO_ABB"));
+
+       btn1 = elm_button_add(ad->popup_poweroff);
+       elm_object_text_set(btn1, _("IDS_ST_SK_OK"));
+       elm_object_part_content_set(ad->popup_poweroff, "button1", btn1);
+       evas_object_smart_callback_add(btn1, "clicked", poweroff_response_yes_cb_min, ad);
+       btn2 = elm_button_add(ad->popup_poweroff);
+       elm_object_text_set(btn2, _("IDS_COM_SK_CANCEL"));
+       elm_object_part_content_set(ad->popup_poweroff, "button2", btn2);
+       evas_object_smart_callback_add(btn2, "clicked", poweroff_response_no_cb_min, ad);
+
+       Ecore_X_Window xwin;
+       xwin = elm_win_xwindow_get(ad->popup_poweroff);
+       ecore_x_netwm_window_type_set(xwin, ECORE_X_WINDOW_TYPE_NOTIFICATION);
+       utilx_set_system_notification_level(ecore_x_display_get(), xwin, UTILX_NOTIFICATION_LEVEL_HIGH);
+       utilx_grab_key(ecore_x_display_get(), xwin, KEY_SELECT, SHARED_GRAB);
+       ecore_event_handler_add(ECORE_EVENT_KEY_UP, poweroff_response_no_cb_min, NULL);
+       evas_object_show(ad->popup_poweroff);
+       
+       return 0;
+       
+}
+
+static void bg_noti_cb(void *data)
+{
+       ui_bgimg_reload((Evas_Object *) data);
+}
+
+/* Create indicator bar */
+static int poweroff_create_indicator(struct appdata *ad)
+{
+
+       elm_win_indicator_mode_set(ad->win_main, ELM_WIN_INDICATOR_HIDE);
+       return 0;
+}
+
+/* Play vibration */
+static int poweroff_play_vibration()
+{
+
+       int ret_val = 0;
+       int dev_handle = 0;
+       int mode = 0;
+
+       /* Open the haptic device */
+       dev_handle = device_haptic_open(DEV_IDX_0, mode);
+       if (dev_handle < 0)
+               return -1;
+
+       /* Play a monotone pattern for 1s */
+       ret_val = device_haptic_play_monotone(dev_handle, 1000);
+       device_haptic_close(dev_handle);
+       if (ret_val < 0)
+               return -1;
+
+       return 0;
+
+}
+
+/* Start UI */
+int poweroff_start(void *data)
+{
+       struct appdata *ad = data;
+       int ret_val = 0;
+
+       /* Create and show popup */
+       ret_val = create_and_show_basic_popup_min(ad);
+       if (ret_val != 0)
+               return -1;
+
+       /* Change LCD brightness */
+       ret_val = pm_change_state(LCD_NORMAL);
+       if (ret_val != 0)
+               return -1;
+
+       /* Play a vibration for 1 sec */
+       ret_val = poweroff_play_vibration();
+       if (ret_val == -1)
+               system_print("\n Poweroff : Play vibration Failed \n");
+
+       return 0;
+}
+
+/* App init */
+int app_create(void *data)
+{
+
+       Evas_Object *win;
+       struct appdata *ad = data;
+
+       /* Create window (Reqd for sys-popup) */
+       win = create_win(PACKAGE);
+       if (win == NULL)
+               return -1;
+
+       ad->win_main = win;
+
+       elm_theme_overlay_add(NULL,EDJ_NAME); 
+
+       return 0;
+}
+
+int main(int argc, char *argv[])
+{
+       struct appdata ad;
+
+       /* App life cycle management */
+       struct appcore_ops ops = {
+               .create = app_create,
+               .terminate = app_terminate,
+               .pause = app_pause,
+               .resume = app_resume,
+               .reset = app_reset,
+       };
+
+       memset(&ad, 0x0, sizeof(struct appdata));
+       ops.data = &ad;
+
+       /* Go into loop */
+       return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
+}
diff --git a/poweroff-popup/src/poweroff.h b/poweroff-popup/src/poweroff.h
new file mode 100644 (file)
index 0000000..213c456
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+
+
+#ifndef __DEF_poweroff_H_
+#define __DEF_poweroff_H_
+
+#include <Elementary.h>
+#include <bundle.h>
+
+#ifndef PREFIX
+#define PREFIX "/usr"
+#endif
+#define TEMP_DIR "/tmp"
+#define PACKAGE "poweroff-popup"
+#define APPNAME "poweroff-popup"
+#define ICON_DIR "/opt/apps/org.tizen.poweroff-syspopup/res/images"
+#define BG_IMAGE TEMP_DIR"/01_popup_bg.jpg"
+#define EDJ_PATH "/opt/apps/org.tizen.poweroff-syspopup/res/edje/poweroff"
+#define EDJ_NAME EDJ_PATH"/poweroff.edj"
+#define GRP_MAIN "main"
+#define APPLICATION_BG 1
+#define INDICATOR_HEIGHT (38)
+#define NEW_INDI
+#define ACCT_PROF
+#define PREDEF_POWEROFF "poweroff"
+#define PREDEF_ENTERSLEEP "entersleep"
+#define MAIN_W (480)
+#define MAIN_H (800)
+#define BEAT
+
+#define NAME_BUF_LEN   128
+#define TITLE_BUF_LEN  128
+#define CONTENT_BUF_LEN        256
+
+/* Popup Response */
+enum {
+       POPUP_RESPONSE_YES = 0,
+       POPUP_RESPONSE_NO,
+       POPUP_RESPONSE_SLEEP
+} response;
+
+/* Text layout */
+struct text_part {
+       char *part;
+       char *msgid;
+};
+
+/* Text part */
+static struct text_part main_txt[] = {
+       {"txt_title", N_("Poweroff"),},
+       {"txt_mesg", N_(""),},
+};
+
+/* Main UI structure */
+struct appdata {
+       Evas *evas;
+       Evas_Object *win_main;
+       Evas_Object *layout_main;
+       Evas_Object *popup;
+       Evas_Object *popup_poweroff;
+       Evas_Object *popup_access;
+       Evas_Object *genlist;
+       Evas_Object *genlist_access;
+
+       Evas_Object *root_w;
+       Evas_Object *root_h;
+       Evas_Object *bg;
+       Evas_Object *indicator;
+       bundle *b;
+
+       /* Added for syspopup */
+       Evas_Object *title;
+       Evas_Object *content;
+
+       Elm_Genlist_Item_Class itc;
+       Elm_Genlist_Item_Class itc1;
+
+       double w_ratio;
+       double h_ratio;
+
+};
+
+#endif                         /* __DEF_poweroff_H__ */
diff --git a/sound/02_Warning.wav b/sound/02_Warning.wav
new file mode 100755 (executable)
index 0000000..9ce5f26
Binary files /dev/null and b/sound/02_Warning.wav differ
diff --git a/sound/09_Low_Battery.wav b/sound/09_Low_Battery.wav
new file mode 100755 (executable)
index 0000000..f61a53e
Binary files /dev/null and b/sound/09_Low_Battery.wav differ