[UI]Lockscreen for RSA
authorJinjin Shi <jinjin.shi@samsung.com>
Fri, 7 Dec 2012 07:38:57 +0000 (15:38 +0800)
committerJinjin Shi <jinjin.shi@samsung.com>
Fri, 7 Dec 2012 12:23:27 +0000 (20:23 +0800)
Change-Id: Idc7c273a3cdbf1c92bda176904f016cb5addb938

77 files changed:
CMakeLists.txt [new file with mode: 0755]
LICENSE [new file with mode: 0755]
data/groups/lock-complex-password.edc [new file with mode: 0755]
data/groups/lock-info.edc [new file with mode: 0755]
data/groups/lock-main.edc [new file with mode: 0755]
data/groups/lock-noti.edc [new file with mode: 0755]
data/groups/lock-simple-password.edc [new file with mode: 0755]
data/groups/lock-slider.edc [new file with mode: 0755]
data/images/RB07_icon_back_01.png [new file with mode: 0755]
data/images/RB07_icon_back_dim.png [new file with mode: 0755]
data/images/RB07_icon_back_normal.png [new file with mode: 0755]
data/images/RB07_icon_back_press.png [new file with mode: 0755]
data/images/RB07_icon_enter.png [new file with mode: 0755]
data/images/RB07_icon_shift_focused.png [new file with mode: 0755]
data/images/RB07_icon_shift_normal.png [new file with mode: 0755]
data/images/RB07_icon_space.png [new file with mode: 0755]
data/images/RB07_key_btn_01.png [new file with mode: 0755]
data/images/RB07_key_btn_02.png [new file with mode: 0755]
data/images/RB07_key_btn_perss.png [new file with mode: 0755]
data/images/RB07_key_btn_qwerty_01.png [new file with mode: 0755]
data/images/RB07_key_btn_qwerty_02.png [new file with mode: 0755]
data/images/RB07_keypad_bg.png [new file with mode: 0755]
data/images/ls_button_default.png [new file with mode: 0755]
data/images/ls_button_press.png [new file with mode: 0755]
data/images/ls_button_sos_phone.png [new file with mode: 0755]
data/images/ls_button_x.png [new file with mode: 0755]
data/images/ls_password_box_01.png [new file with mode: 0755]
data/images/ls_password_star_01.png [new file with mode: 0755]
data/images/slider/RB07_Unlock_bg.png [new file with mode: 0755]
data/images/slider/RB07_Unlock_bg_press.png [new file with mode: 0755]
data/images/slider/RB07_icon_Unlock_01.png [new file with mode: 0755]
data/images/slider/RB07_icon_Unlock_02.png [new file with mode: 0755]
data/images/slider/RB07_icon_Unlock_arrow.png [new file with mode: 0755]
data/images/slider/RB07_icon_Unlock_arrow_press.png [new file with mode: 0755]
data/images/slider/RB07_icon_Unlock_press_01.png [new file with mode: 0755]
data/images/slider/RB07_icon_Unlock_press_02.png [new file with mode: 0755]
data/images/slider/RB07_icon_Unlock_press_03.png [new file with mode: 0755]
data/images/slider/RB07_icon_Unlock_press_04.png [new file with mode: 0755]
data/images/slider/RB07_icon_Unlock_press_05.png [new file with mode: 0755]
data/images/slider/RB07_icon_Unlock_press_06.png [new file with mode: 0755]
data/images/slider/RB07_icon_Unlock_press_07.png [new file with mode: 0755]
data/images/slider/RB07_icon_Unlock_press_08.png [new file with mode: 0755]
data/images/slider/RB07_icon_Unlock_press_09.png [new file with mode: 0755]
data/images/slider/RB07_icon_Unlock_press_10.png [new file with mode: 0755]
data/images/slider/RB07_icon_Unlock_press_11.png [new file with mode: 0755]
data/images/slider/RB07_icon_Unlock_press_12.png [new file with mode: 0755]
data/images/slider/RB07_icon_Unlock_press_13.png [new file with mode: 0755]
data/images/slider/RB07_icon_Unlock_press_14.png [new file with mode: 0755]
data/images/slider/RB07_icon_Unlock_press_15.png [new file with mode: 0755]
data/lockscreen-entry.edc [new file with mode: 0755]
data/lockscreen.edc [new file with mode: 0755]
debian/changelog [new file with mode: 0755]
debian/compat [new file with mode: 0755]
debian/control [new file with mode: 0755]
debian/org.tizen.lockscreen.install.in [new file with mode: 0755]
debian/org.tizen.lockscreen.postinst [new file with mode: 0755]
debian/rules [new file with mode: 0755]
org.tizen.lockscreen.manifest [new file with mode: 0755]
org.tizen.lockscreen.xml.in [new file with mode: 0755]
packaging/org.tizen.lockscreen.spec [new file with mode: 0755]
src/bg.c [new file with mode: 0755]
src/bg.h [new file with mode: 0755]
src/complex-password.c [new file with mode: 0755]
src/complex-password.h [new file with mode: 0755]
src/info.c [new file with mode: 0755]
src/info.h [new file with mode: 0755]
src/lockscreen.c [new file with mode: 0755]
src/lockscreen.h [new file with mode: 0755]
src/log.h [new file with mode: 0755]
src/noti.c [new file with mode: 0755]
src/noti.h [new file with mode: 0755]
src/password-verification.c [new file with mode: 0755]
src/password-verification.h [new file with mode: 0755]
src/simple-password.c [new file with mode: 0755]
src/simple-password.h [new file with mode: 0755]
src/util.c [new file with mode: 0755]
src/util.h [new file with mode: 0755]

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..c86a2a0
--- /dev/null
@@ -0,0 +1,105 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(lockscreen C)
+
+SET(SRCS
+       ${CMAKE_SOURCE_DIR}/src/lockscreen.c
+       ${CMAKE_SOURCE_DIR}/src/util.c
+       ${CMAKE_SOURCE_DIR}/src/info.c
+       ${CMAKE_SOURCE_DIR}/src/bg.c
+       ${CMAKE_SOURCE_DIR}/src/noti.c
+       ${CMAKE_SOURCE_DIR}/src/simple-password.c
+       ${CMAKE_SOURCE_DIR}/src/complex-password.c
+       ${CMAKE_SOURCE_DIR}/src/password-verification.c
+)
+
+SET(VENDOR "tizen")
+SET(PACKAGE ${PROJECT_NAME})
+SET(PKGNAME "org.${VENDOR}.${PACKAGE}")
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(BINDIR "${PREFIX}/bin")
+SET(RESDIR "${PREFIX}/res")
+SET(DATADIR "/opt/usr/${PKGNAME}/data")
+SET(LOCALEDIR "${RESDIR}/locale")
+SET(IMAGEDIR "${RESDIR}/image/${PROJECT_NAME}")
+SET(EDJEDIR "${RESDIR}/edje/${PROJECT_NAME}")
+SET(ETCDIR "${RESDIR}/etc/${PROJECT_NAME}")
+SET(MANIFESTXMLDIR "/usr/share/packages")
+
+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}
+       ${CMAKE_SOURCE_DIR}/src
+)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED
+       capi-appfw-application
+       ecore-x
+       appcore-efl
+       utilX
+       ail
+       notification
+       mdm
+       security-server
+)
+
+FOREACH(flag ${pkgs_CFLAGS})
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag} -fpie")
+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("-DVENDOR=\"${VENDOR}\"")
+ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
+ADD_DEFINITIONS("-DPACKAGE_NAME=\"${PKGNAME}\"")
+ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
+ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
+ADD_DEFINITIONS("-DDATADIR=\"${DATADIR}\"")
+ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
+ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"")
+ADD_DEFINITIONS("-DICONDIR=\"${ICONDIR}\"")
+ADD_DEFINITIONS("-DEDJEDIR=\"${EDJEDIR}\"")
+ADD_DEFINITIONS("-DETCDIR=\"${ETCDIR}\"")
+
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
+
+ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} "-lm")
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
+
+ADD_CUSTOM_TARGET(lockscreen.edj
+               COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/data/images/
+               ${CMAKE_CURRENT_SOURCE_DIR}/data/lockscreen.edc
+               ${CMAKE_BINARY_DIR}/lockscreen.edj
+               DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/data/lockscreen.edc
+)
+ADD_CUSTOM_TARGET(lockscreen-entry.edj
+               COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/data/images/
+               ${CMAKE_CURRENT_SOURCE_DIR}/data/lockscreen-entry.edc
+               ${CMAKE_BINARY_DIR}/lockscreen-entry.edj
+               DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/data/lockscreen-entry.edc
+)
+
+ADD_DEPENDENCIES(${PROJECT_NAME} lockscreen.edj _theme.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} lockscreen-entry.edj)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/lockscreen.edj DESTINATION ${EDJEDIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/lockscreen-entry.edj DESTINATION ${EDJEDIR})
+
+CONFIGURE_FILE(${PKGNAME}.xml.in ${CMAKE_BINARY_DIR}/${PKGNAME}.xml)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/${PKGNAME}.xml DESTINATION ${MANIFESTXMLDIR})
+
+INSTALL(DIRECTORY DESTINATION ${DATADIR})
diff --git a/LICENSE b/LICENSE
new file mode 100755 (executable)
index 0000000..ccbf311
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,75 @@
+Flora License\r
+\r
+Version 1.0, May, 2012\r
+\r
+http://www.tizenopensource.org/license\r
+\r
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\r
+\r
+1. Definitions.\r
+\r
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.\r
+\r
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.\r
+\r
+"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.\r
+\r
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.\r
+\r
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.\r
+\r
+"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.\r
+\r
+"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).\r
+\r
+"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.\r
+\r
+"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."\r
+\r
+"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.\r
+\r
+"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.\r
+\r
+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.\r
+\r
+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.\r
+\r
+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:\r
+\r
+  1. You must give any other recipients of the Work or Derivative Works a copy of this License; and\r
+\r
+  2. You must cause any modified files to carry prominent notices stating that You changed the files; and\r
+\r
+  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\r
+\r
+  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.\r
+\r
+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.\r
+\r
+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.\r
+\r
+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.\r
+\r
+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.\r
+\r
+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.\r
+\r
+END OF TERMS AND CONDITIONS\r
+\r
+APPENDIX: How to apply the Flora License to your work\r
+\r
+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.\r
+\r
+   Copyright [yyyy] [name of copyright owner]\r
+\r
+   Licensed under the Flora License, Version 1.0 (the "License");\r
+   you may not use this file except in compliance with the License.\r
+   You may obtain a copy of the License at\r
+\r
+       http://www.tizenopensource.org/license\r
+\r
+   Unless required by applicable law or agreed to in writing, software\r
+   distributed under the License is distributed on an "AS IS" BASIS,\r
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+   See the License for the specific language governing permissions and\r
+   limitations under the License.\r
diff --git a/data/groups/lock-complex-password.edc b/data/groups/lock-complex-password.edc
new file mode 100755 (executable)
index 0000000..7173288
--- /dev/null
@@ -0,0 +1,1310 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the License);\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *  http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an AS IS BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#define KEYPAD_PANEL_WIDTH 720.0\r
+#define KEYPAD_PANEL_HEIGHT 536.0\r
+#define KEYPAD_BUTTON_WIDTH 62.0\r
+#define KEYPAD_BUTTON_HEIGHT 82.0\r
+#define KEYPAD_REL_W(x) ((x)/KEYPAD_PANEL_WIDTH)\r
+#define KEYPAD_REL_H(y) ((y)/KEYPAD_PANEL_HEIGHT)\r
+#define KEYPAD_BUTTON_REL_W(x) ((x)/KEYPAD_BUTTON_WIDTH)\r
+#define KEYPAD_BUTTON_REL_H(y) ((y)/KEYPAD_BUTTON_HEIGHT)\r
+\r
+#define MODE_ALPHA_LOWER 0\r
+#define MODE_ALPHA_UPPER 1\r
+#define MODE_SYMBOL_1 2\r
+#define MODE_SYMBOL_2 3\r
+\r
+#define DECLARE_KEY_CHAR_TABLE() \\r
+                       new keyChar[152] = { \\r
+                               '1', '1', ' ',  ' ', \\r
+                               '2', '2', ' ',  ' ', \\r
+                               '3', '3', ' ',  ' ', \\r
+                               '4', '4', ' ',  ' ', \\r
+                               '5', '5', ' ',  ' ', \\r
+                               '6', '6', ' ',  ' ', \\r
+                               '7', '7', ' ',  ' ', \\r
+                               '8', '8', ' ',  ' ', \\r
+                               '9', '9', ' ',  ' ', \\r
+                               '0', '0', ' ',  ' ', \\r
+                               'q', 'Q', '1',  '#', \\r
+                               'w', 'W', '2',  '&', \\r
+                               'e', 'E', '3',  '%', \\r
+                               'r', 'R', '4',  '+', \\r
+                               't', 'T', '5',  '=', \\r
+                               'y', 'Y', '6',  '_', \\r
+                               'u', 'U', '7',  ' ', \\r
+                               'i', 'I', '8',  '|', \\r
+                               'o', 'O', '9',  '<', \\r
+                               'p', 'P', '0',  '>', \\r
+                               'a', 'A', '-',  '{', \\r
+                               's', 'S', '@',  '}', \\r
+                               'd', 'D', '*',  '[', \\r
+                               'f', 'F', '^',  ']', \\r
+                               'g', 'G', ':',  '$', \\r
+                               'h', 'H', ';',  ' ', \\r
+                               'j', 'J', '(',  ' ', \\r
+                               'k', 'K', ')',  ' ', \\r
+                               'l', 'L', '~',  ' ', \\r
+                               'z', 'Z', '/',  ' ', \\r
+                               'x', 'X', '\39',' ', \\r
+                               'c', 'C', '\34',' ', \\r
+                               'v', 'V', '.',  ' ', \\r
+                               'b', 'B', ',',  ' ', \\r
+                               'n', 'N', '?',  ' ', \\r
+                               'm', 'M', '!',  ' ', \\r
+                               ',', ',', ',',  ',', \\r
+                               '.', '.', '.',  '.' \\r
+                       };\\r
+\r
+#define DECLARE_KEY_DISP_STATUS_TABLE() \\r
+                       new keyDispInfo[152] = { \\r
+                               1, 1, 0,  0, \\r
+                               1, 1, 0,  0, \\r
+                               1, 1, 0,  0, \\r
+                               1, 1, 0,  0, \\r
+                               1, 1, 0,  0, \\r
+                               1, 1, 0,  0, \\r
+                               1, 1, 0,  0, \\r
+                               1, 1, 0,  0, \\r
+                               1, 1, 0,  0, \\r
+                               1, 1, 0,  0, \\r
+                               1, 1, 1,  1, \\r
+                               1, 1, 1,  1, \\r
+                               1, 1, 1,  1, \\r
+                               1, 1, 1,  1, \\r
+                               1, 1, 1,  1, \\r
+                               1, 1, 1,  1, \\r
+                               1, 1, 1,  2, \\r
+                               1, 1, 1,  1, \\r
+                               1, 1, 1,  1, \\r
+                               1, 1, 1,  1, \\r
+                               1, 1, 1,  1, \\r
+                               1, 1, 1,  1, \\r
+                               1, 1, 1,  1, \\r
+                               1, 1, 1,  1, \\r
+                               1, 1, 1,  1, \\r
+                               1, 1, 1,  2, \\r
+                               1, 1, 1,  2, \\r
+                               1, 1, 1,  2, \\r
+                               1, 1, 1,  2, \\r
+                               1, 1, 1,  2, \\r
+                               1, 1, 1,  2, \\r
+                               1, 1, 1,  2, \\r
+                               1, 1, 1,  2, \\r
+                               1, 1, 1,  2, \\r
+                               1, 1, 1,  2, \\r
+                               1, 1, 1,  2, \\r
+                               1, 1, 1,  1, \\r
+                               1, 1, 1,  1 \\r
+                       }; \\r
+\r
+#define PART_KEYPAD_PLAIN_BUTTON(code, offx, offy, file, file_press) \\r
+                       part { \\r
+                               name: code; \\r
+                               type: IMAGE; \\r
+                               scale: 1; \\r
+                               mouse_events: 1; \\r
+                               description { \\r
+                                       state: "default" 0.0; \\r
+                                       rel1 { relative: KEYPAD_REL_W(offx) KEYPAD_REL_H(offy); to:"keypad.bg";} \\r
+                                       rel2 { relative: KEYPAD_REL_W(offx+KEYPAD_BUTTON_WIDTH) KEYPAD_REL_H(offy+KEYPAD_BUTTON_HEIGHT); to:"keypad.bg"; } \\r
+                                       color: 255 255 255 255; \\r
+                                       image { \\r
+                                               normal: file; \\r
+                                               border: 9 9 9 9; \\r
+                                               border_scale: 1; \\r
+                                       } \\r
+                               } \\r
+                               description { \\r
+                                       state: "pressed" 0.0; \\r
+                                       inherit: "default" 0.0; \\r
+                                       image.normal: file_press; \\r
+                               } \\r
+                               description { \\r
+                                       state: "hide" 0.0; \\r
+                                       visible: 0; \\r
+                               } \\r
+                       } \\r
+                       part { \\r
+                               name: code"_TEXT"; \\r
+                               type: TEXT; \\r
+                               scale: 1; \\r
+                               effect: SHADOW; \\r
+                               mouse_events: 0; \\r
+                               repeat_events: 1; \\r
+                               description { \\r
+                                       state: "default" 0.0; \\r
+                                       rel1 { relative: 0.0 KEYPAD_BUTTON_REL_H(0); to: code;} \\r
+                                       rel2 { relative: 1.0 KEYPAD_BUTTON_REL_H(82); to: code;} \\r
+                                       fixed: 1 1; \\r
+                                       align: 0.5 0.5; \\r
+                                       color: 255 255 255 255; \\r
+                                       text { \\r
+                                               font: "SLP:style=Bold"; \\r
+                                               text_class: "slp"; \\r
+                                               text: ""; \\r
+                                               size: 48; \\r
+                                               min:  0 0; \\r
+                                               align: 0.5 0.5; \\r
+                                       } \\r
+                               } \\r
+                               description { \\r
+                                       state: "hide" 0.0; \\r
+                                       visible: 0; \\r
+                               } \\r
+                       }\r
+\r
+#define PROG_BUTTON_REACTION(txt) \\r
+                       program { \\r
+                               name: "down_"txt; \\r
+                               signal: "mouse,down,*"; \\r
+                               source: txt; \\r
+                               script { \\r
+                                       set_state(PART:txt, "pressed", 0.0); \\r
+                                       emit("pad_down", txt); \\r
+                               } \\r
+                       } \\r
+                       program { \\r
+                               name: "ani_"txt; \\r
+                               signal: "ani"; \\r
+                               source: txt; \\r
+                               action: STATE_SET "default" 0.0; \\r
+                               transition: SINUSOIDAL 0.05; \\r
+                               target: txt; \\r
+                       } \\r
+                       program { \\r
+                               name: "up_"txt; \\r
+                               signal: "mouse,up,1"; \\r
+                               source: txt; \\r
+                               script { \\r
+                                       emit("pad_up", txt); \\r
+                                       emit("ani", txt); \\r
+                               } \\r
+                       } \\r
+\r
+#define PROG_KEYPAD_PLAIN_BUTTON(txt) \\r
+                       program { \\r
+                               name: "down_"txt; \\r
+                               signal: "mouse,down,*"; \\r
+                               source: txt; \\r
+                               script { \\r
+                                       if (get_key_disp_info_by_index(txt) == 1) { \\r
+                                               set_state(PART:txt, "pressed", 0.0); \\r
+                                               emit("pad_down", txt); \\r
+                                       } \\r
+                               } \\r
+                       } \\r
+                       program { \\r
+                               name: "ani_"txt; \\r
+                               signal: "ani"; \\r
+                               source: txt; \\r
+                               action: STATE_SET "default" 0.0; \\r
+                               transition: SINUSOIDAL 0.05; \\r
+                               target: txt; \\r
+                       } \\r
+                       program { \\r
+                               name: "up_"txt; \\r
+                               signal: "mouse,up,1"; \\r
+                               source: txt; \\r
+                               script { \\r
+                                       emit("pad_up", txt); \\r
+                                       emit("ani", txt); \\r
+                               } \\r
+                       } \\r
+                       program { \\r
+                               name: "clicked_"txt; \\r
+                               signal: "mouse,clicked,1"; \\r
+                               source: txt; \\r
+                               script { \\r
+                                       if (get_key_disp_info_by_index(txt) == 1) { \\r
+                                               new key_str[2]; \\r
+                                               get_text(PART:txt"_TEXT", key_str, 2); \\r
+                                               emit("pad_qwerty_clicked", key_str); \\r
+                                       } \\r
+                               } \\r
+                       } \\r
+\r
+group{\r
+       name: "lock-complex-password";\r
+       images {\r
+               image: "ls_password_box_01.png" COMP;\r
+               image: "ls_password_star_01.png" COMP;\r
+       }\r
+\r
+       parts{\r
+               part{\r
+                       name: "bg";\r
+                       type: RECT;\r
+                       mouse_events: 1;\r
+                       description{\r
+                               state: "default" 0.0;\r
+                               color: 0 0 0 0;\r
+                       }\r
+               }\r
+               part{\r
+                       name: "txt.title";\r
+                       type: TEXT;\r
+                       scale: 1;\r
+                       mouse_events: 0;\r
+                       effect: FAR_SHADOW;\r
+                       description{\r
+                               state: "default" 0.0;\r
+                               color: 255 255 255 255;\r
+                               rel1 {relative: 0.0 122/1280; to: "bg";}\r
+                               rel2 {relative: 1.0 (122+110)/1280; to: "bg";}\r
+                               text{\r
+                                       font: "SLP:style=Medium";\r
+                                       text_class: "slp";\r
+                                       size: 36;\r
+                                       align: 0.5 0.5;\r
+                               }\r
+                       }\r
+               }\r
+               part{\r
+                       name: "rect.password";\r
+                       type: IMAGE;\r
+                       scale: 1;\r
+                       mouse_events: 1;\r
+                       description{\r
+                               state: "default" 0.0;\r
+                               rel1 {relative: 74/720 (126+110+12)/1280; to: "bg";}\r
+                               rel2 {relative: (74+572)/720 (126+110+12+140)/1280; to: "bg";}\r
+                               image {\r
+                                       normal: "ls_password_box_01.png";\r
+                                       border: 9 9 9 9;\r
+                                       border_scale: 1;\r
+                               }\r
+                       }\r
+               }\r
+               part{\r
+                       name: "sw.password";\r
+                       type: SWALLOW;\r
+                       scale: 1;\r
+                       mouse_events: 1;\r
+                       repeat_events: 1;\r
+                       description{\r
+                               state: "default" 0.0;\r
+                               align: 0.0 0.5;\r
+                               fixed: 1 1;\r
+                               rel1{\r
+                                       relative: 0.025 0.0;\r
+                                       to: "rect.password";\r
+                               }\r
+                               rel2{\r
+                                       relative: 0.975 1.0;\r
+                                       to: "rect.password";\r
+                               }\r
+                       }\r
+               }\r
+               part{\r
+                       name: "txt.result";\r
+                       type: TEXT;\r
+                       scale: 1;\r
+                       mouse_events: 0;\r
+                       effect: FAR_SHADOW;\r
+                       description{\r
+                               state: "default" 0.0;\r
+                               min: 0 88;\r
+                               color: 255 255 255 255;\r
+                               rel1 {relative: 42/720 1.0; to_x: "bg"; to_y: "rect.password"; offset: 0 40;}\r
+                               rel2 {relative: (720-42)/720 1.0; to_x: "bg"; to_y: "rect.password"; offset: 0 40;}\r
+                               text{\r
+                                       font: "SLP:style=Medium";\r
+                                       text_class: "slp";\r
+                                       size: 36;\r
+                                       align: 0.5 0.5;\r
+                               }\r
+                       }\r
+               }\r
+               part{\r
+                       name: "sw.keypad.qwerty";\r
+                       type: SWALLOW;\r
+                       scale: 1;\r
+                       mouse_events: 1;\r
+                       description{\r
+                               state: "default" 0.0;\r
+                               fixed: 0 1;\r
+                               align: 0.0 0.0;\r
+                               rel1{\r
+                                       relative: 0.0 1.0;\r
+                                       to: "bg";\r
+                               }\r
+                               rel2{\r
+                                       relative: 1.0 1.0;\r
+                                       to: "bg";\r
+                               }\r
+                       }\r
+                       description{\r
+                               state: "show" 0.0;\r
+                               inherit: "default" 0.0;\r
+                               rel1{\r
+                                       relative: 0.0 (1280-536)/1280;\r
+                                       to: "bg";\r
+                               }\r
+                               rel2{\r
+                                       relative: 1.0 1.0;\r
+                                       to: "bg";\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+       programs {\r
+               program{\r
+                       name: "show,qwertykeyboard";\r
+                       signal: "show,qwertykeyboard";\r
+                       source: "sw.keypad.qwerty";\r
+                       action: STATE_SET "show" 0.0;\r
+                       target: "sw.keypad.qwerty";\r
+                       transition: LINEAR 0.2;\r
+               }\r
+               program{\r
+                       name: "hide,qwertykeyboard";\r
+                       signal: "hide,qwertykeyboard";\r
+                       source: "sw.keypad.qwerty";\r
+                       action: STATE_SET "default" 0.0;\r
+                       target: "sw.keypad.qwerty";\r
+                       transition: LINEAR 0.2;\r
+                       after: "hide,complexpw";\r
+               }\r
+               program{\r
+                       name: "hide,complexpw";\r
+                       signal: "hide,complexpw";\r
+                       source: "sw.keypad.qwerty";\r
+                       action: SIGNAL_EMIT "hide,complexpw" "event";\r
+               }\r
+       }\r
+}\r
+\r
+group{\r
+       name: "lock-keypad-qwerty";\r
+\r
+       images {\r
+               image: "RB07_key_btn_01.png" COMP;\r
+               image: "RB07_key_btn_02.png" COMP;\r
+               image: "RB07_key_btn_perss.png" COMP;\r
+               image: "RB07_icon_back_normal.png" COMP;\r
+               image: "RB07_icon_back_dim.png" COMP;\r
+               image: "RB07_icon_back_press.png" COMP;\r
+               image: "RB07_key_btn_qwerty_01.png" COMP;\r
+               image: "RB07_key_btn_qwerty_02.png" COMP;\r
+               image: "RB07_icon_back_01.png" COMP;\r
+               image: "RB07_icon_enter.png" COMP;\r
+               image: "RB07_icon_shift_focused.png" COMP;\r
+               image: "RB07_icon_shift_normal.png" COMP;\r
+               image: "RB07_icon_space.png" COMP;\r
+               image: "RB07_keypad_bg.png" COMP;\r
+               image: "ls_button_sos_phone.png" COMP;\r
+       }\r
+\r
+       script {\r
+               public g_key_mode;\r
+\r
+               public init_qwerty_keypad() {\r
+                       set_int(g_key_mode, MODE_ALPHA_LOWER);\r
+                       set_key_display(MODE_ALPHA_LOWER);\r
+                       set_key_text(MODE_ALPHA_LOWER);\r
+               }\r
+\r
+               public switch_input_mode(mode) {\r
+                       set_key_display(mode);\r
+                       set_key_text(mode);\r
+                       set_int(g_key_mode, mode);\r
+               }\r
+\r
+               public set_key_display(mode) {\r
+                       DECLARE_KEY_DISP_STATUS_TABLE()\r
+\r
+                       if (keyDispInfo[0 + mode] == 0) {\r
+                               set_state(PART:"0", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"0", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[4 + mode] == 0) {\r
+                               set_state(PART:"1", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"1", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[8 + mode] == 0) {\r
+                               set_state(PART:"2", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"2", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[12 + mode] == 0) {\r
+                               set_state(PART:"3", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"3", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[16 + mode] == 0) {\r
+                               set_state(PART:"4", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"4", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[20 + mode] == 0) {\r
+                               set_state(PART:"5", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"5", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[24 + mode] == 0) {\r
+                               set_state(PART:"6", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"6", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[28 + mode] == 0) {\r
+                               set_state(PART:"7", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"7", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[32 + mode] == 0) {\r
+                               set_state(PART:"8", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"8", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[36 + mode] == 0) {\r
+                               set_state(PART:"9", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"9", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[40 + mode] == 0) {\r
+                               set_state(PART:"10", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"10", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[44 + mode] == 0) {\r
+                               set_state(PART:"11", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"11", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[48 + mode] == 0) {\r
+                               set_state(PART:"12", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"12", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[52 + mode] == 0) {\r
+                               set_state(PART:"13", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"13", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[56 + mode] == 0) {\r
+                               set_state(PART:"14", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"14", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[60 + mode] == 0) {\r
+                               set_state(PART:"15", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"15", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[64 + mode] == 0) {\r
+                               set_state(PART:"16", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"16", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[68 + mode] == 0) {\r
+                               set_state(PART:"17", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"17", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[72 + mode] == 0) {\r
+                               set_state(PART:"18", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"18", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[76 + mode] == 0) {\r
+                               set_state(PART:"19", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"19", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[80 + mode] == 0) {\r
+                               set_state(PART:"20", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"20", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[84 + mode] == 0) {\r
+                               set_state(PART:"21", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"21", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[88 + mode] == 0) {\r
+                               set_state(PART:"22", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"22", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[92 + mode] == 0) {\r
+                               set_state(PART:"23", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"23", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[96 + mode] == 0) {\r
+                               set_state(PART:"24", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"24", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[100 + mode] == 0) {\r
+                               set_state(PART:"25", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"25", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[104 + mode] == 0) {\r
+                               set_state(PART:"26", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"26", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[108 + mode] == 0) {\r
+                               set_state(PART:"27", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"27", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[112 + mode] == 0) {\r
+                               set_state(PART:"28", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"28", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[116 + mode] == 0) {\r
+                               set_state(PART:"29", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"29", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[120 + mode] == 0) {\r
+                               set_state(PART:"30", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"30", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[124 + mode] == 0) {\r
+                               set_state(PART:"31", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"31", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[128 + mode] == 0) {\r
+                               set_state(PART:"32", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"32", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[132 + mode] == 0) {\r
+                               set_state(PART:"33", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"33", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[136 + mode] == 0) {\r
+                               set_state(PART:"34", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"34", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[140 + mode] == 0) {\r
+                               set_state(PART:"35", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"35", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[144 + mode] == 0) {\r
+                               set_state(PART:"36", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"36", "default", 0.0);\r
+                       }\r
+                       if (keyDispInfo[148 + mode] == 0) {\r
+                               set_state(PART:"37", "hide", 0.0);\r
+                       } else {\r
+                               set_state(PART:"37", "default", 0.0);\r
+                       }\r
+               }\r
+\r
+               public set_key_text(mode) {\r
+                       DECLARE_KEY_CHAR_TABLE()\r
+                       new keyStr[2];\r
+\r
+                       snprintf(keyStr, 2, "%c", keyChar[0 + mode]);\r
+                       set_text(PART:"0_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[4 + mode]);\r
+                       set_text(PART:"1_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[8 + mode]);\r
+                       set_text(PART:"2_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[12 + mode]);\r
+                       set_text(PART:"3_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[16 + mode]);\r
+                       set_text(PART:"4_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[20 + mode]);\r
+                       set_text(PART:"5_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[24 + mode]);\r
+                       set_text(PART:"6_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[28 + mode]);\r
+                       set_text(PART:"7_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[32 + mode]);\r
+                       set_text(PART:"8_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[36 + mode]);\r
+                       set_text(PART:"9_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[40 + mode]);\r
+                       set_text(PART:"10_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[44 + mode]);\r
+                       set_text(PART:"11_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[48 + mode]);\r
+                       set_text(PART:"12_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[52 + mode]);\r
+                       set_text(PART:"13_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[56 + mode]);\r
+                       set_text(PART:"14_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[60 + mode]);\r
+                       set_text(PART:"15_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[64 + mode]);\r
+                       set_text(PART:"16_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[68 + mode]);\r
+                       set_text(PART:"17_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[72 + mode]);\r
+                       set_text(PART:"18_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[76 + mode]);\r
+                       set_text(PART:"19_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[80 + mode]);\r
+                       set_text(PART:"20_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[84 + mode]);\r
+                       set_text(PART:"21_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[88 + mode]);\r
+                       set_text(PART:"22_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[92 + mode]);\r
+                       set_text(PART:"23_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[96 + mode]);\r
+                       set_text(PART:"24_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[100 + mode]);\r
+                       set_text(PART:"25_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[104 + mode]);\r
+                       set_text(PART:"26_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[108 + mode]);\r
+                       set_text(PART:"27_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[112 + mode]);\r
+                       set_text(PART:"28_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[116 + mode]);\r
+                       set_text(PART:"29_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[120 + mode]);\r
+                       set_text(PART:"30_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[124 + mode]);\r
+                       set_text(PART:"31_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[128 + mode]);\r
+                       set_text(PART:"32_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[132 + mode]);\r
+                       set_text(PART:"33_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[136 + mode]);\r
+                       set_text(PART:"34_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[140 + mode]);\r
+                       set_text(PART:"35_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[144 + mode]);\r
+                       set_text(PART:"36_TEXT", keyStr);\r
+                       snprintf(keyStr, 2, "%c", keyChar[148 + mode]);\r
+                       set_text(PART:"37_TEXT", keyStr);\r
+               }\r
+\r
+               public get_key_disp_info_by_index(code[]) {\r
+                       DECLARE_KEY_DISP_STATUS_TABLE()\r
+                       new keyIdx;\r
+\r
+                       keyIdx = (atoi(code) * 4) + get_int(g_key_mode);\r
+\r
+                       return keyDispInfo[keyIdx];\r
+               }\r
+       }\r
+\r
+       parts{\r
+               part{\r
+                       name: "keypad.bg";\r
+                       type: RECT;\r
+                       mouse_events: 1;\r
+                       description{\r
+                               state: "default" 0.0;\r
+                               color: 0 0 0 0;\r
+                       }\r
+               }\r
+               part{\r
+                       name: "keypad.bg.image";\r
+                       type: IMAGE;\r
+                       scale: 1;\r
+                       mouse_events: 1;\r
+\r
+                       description{\r
+                               state: "default" 0.0;\r
+                               fixed: 1 1;\r
+\r
+                               rel1{\r
+                                       relative: 0.0 0.0;\r
+                                       to: "keypad.bg";\r
+                               }\r
+                               rel2{\r
+                                       relative: 1.0 1.0;\r
+                                       to: "keypad.bg";\r
+                               }\r
+                               image {\r
+                                       normal: "RB07_keypad_bg.png";\r
+                                       border: 9 9 9 9;\r
+                                       border_scale: 1;\r
+                               }\r
+                       }\r
+                       description{\r
+                               state: "small" 0.0;\r
+                               inherit: "default" 0.0;\r
+\r
+                               rel1{\r
+                                       relative: KEYPAD_REL_W(0) KEYPAD_REL_H(108);\r
+                                       to: "keypad.bg";\r
+                               }\r
+                               rel2{\r
+                                       relative: KEYPAD_REL_W(KEYPAD_PANEL_WIDTH) KEYPAD_REL_H(KEYPAD_PANEL_HEIGHT);\r
+                                       to: "keypad.bg";\r
+                               }\r
+                       }\r
+               }\r
+\r
+               PART_KEYPAD_PLAIN_BUTTON("0",   4, 10, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("1",  76, 10, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("2", 148, 10, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("3", 220, 10, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("4", 292, 10, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("5", 364, 10, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("6", 436, 10, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("7", 508, 10, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("8", 580, 10, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("9", 652, 10, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+\r
+               PART_KEYPAD_PLAIN_BUTTON("10",   4, 118, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("11",  76, 118, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("12", 148, 118, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("13", 220, 118, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("14", 292, 118, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("15", 364, 118, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("16", 436, 118, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("17", 508, 118, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("18", 580, 118, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("19", 652, 118, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+\r
+               PART_KEYPAD_PLAIN_BUTTON("20",  40, 226, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("21", 112, 226, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("22", 184, 226, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("23", 256, 226, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("24", 328, 226, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("25", 400, 226, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("26", 472, 226, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("27", 544, 226, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("28", 616, 226, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+\r
+               PART_KEYPAD_PLAIN_BUTTON("29", 112, 334, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("30", 184, 334, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("31", 256, 334, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("32", 328, 334, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("33", 400, 334, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("34", 472, 334, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("35", 544, 334, "RB07_key_btn_01.png", "RB07_key_btn_perss.png")\r
+\r
+               PART_KEYPAD_PLAIN_BUTTON("36", (4+98+10+98+10), 442, "RB07_key_btn_02.png", "RB07_key_btn_perss.png")\r
+               PART_KEYPAD_PLAIN_BUTTON("37", 544, 442, "RB07_key_btn_02.png", "RB07_key_btn_perss.png")\r
+\r
+               part {\r
+                       name: "FUNCTION_0";\r
+                       type: IMAGE;\r
+                       scale: 1;\r
+                       mouse_events: 1;\r
+                       description {\r
+                               state: "default" 0.0;\r
+                               rel1 { relative: KEYPAD_REL_W(4) KEYPAD_REL_H(442); to:"keypad.bg";}\r
+                               rel2 { relative: KEYPAD_REL_W(4+98) KEYPAD_REL_H(442+KEYPAD_BUTTON_HEIGHT); to:"keypad.bg"; }\r
+                               color: 255 255 255 255;\r
+                               image {\r
+                                       normal: "RB07_key_btn_02.png";\r
+                                       border: 9 9 9 9;\r
+                                       border_scale: 1;\r
+                               }\r
+                       }\r
+                       description {\r
+                               state: "pressed" 0.0;\r
+                               inherit: "default" 0.0;\r
+                               image.normal: "RB07_key_btn_perss.png";\r
+                       }\r
+                       description {\r
+                               state: "hide" 0.0;\r
+                               visible: 0;\r
+                       }\r
+               }\r
+               part {\r
+                       name: "FUNCTION_0_icon";\r
+                       type: IMAGE;\r
+                       scale: 1;\r
+                       mouse_events: 1;\r
+                       repeat_events: 1;\r
+                       description {\r
+                               state: "default" 0.0;\r
+                               min: 80 80;\r
+                               rel1 { relative: 0.5 0.5; to:"FUNCTION_0";}\r
+                               rel2 { relative: 0.5 0.5; to:"FUNCTION_0"; }\r
+                               image {\r
+                                       normal: "ls_button_sos_phone.png";\r
+                               }\r
+                       }\r
+                       description {\r
+                               state: "pressed" 0.0;\r
+                               inherit: "default" 0.0;\r
+                               image {\r
+                                       normal: "ls_button_sos_phone.png";\r
+                               }\r
+                       }\r
+               }\r
+\r
+               part {\r
+                       name: "FUNCTION_1";\r
+                       type: IMAGE;\r
+                       scale: 1;\r
+                       mouse_events: 1;\r
+                       description {\r
+                               state: "default" 0.0;\r
+                               rel1 { relative: KEYPAD_REL_W(4+98+10) KEYPAD_REL_H(442); to:"keypad.bg";}\r
+                               rel2 { relative: KEYPAD_REL_W(4+98+10+98) KEYPAD_REL_H(442+KEYPAD_BUTTON_HEIGHT); to:"keypad.bg"; }\r
+                               color: 255 255 255 255;\r
+                               image {\r
+                                       normal: "RB07_key_btn_02.png";\r
+                                       border: 9 9 9 9;\r
+                                       border_scale: 1;\r
+                               }\r
+                       }\r
+                       description {\r
+                               state: "pressed" 0.0;\r
+                               inherit: "default" 0.0;\r
+                               image.normal: "RB07_key_btn_perss.png";\r
+                       }\r
+                       description {\r
+                               state: "hide" 0.0;\r
+                               visible: 0;\r
+                       }\r
+               }\r
+               part {\r
+                       name: "FUNCTION_1_TEXT";\r
+                       type: TEXT;\r
+                       scale: 1;\r
+                       effect: SHADOW;\r
+                       mouse_events: 0;\r
+                       repeat_events: 1;\r
+                       description {\r
+                               state: "default" 0.0;\r
+                               rel1 { relative: 0.0 KEYPAD_BUTTON_REL_H(0); to: "FUNCTION_1";}\r
+                               rel2 { relative: 1.0 KEYPAD_BUTTON_REL_H(KEYPAD_BUTTON_HEIGHT); to: "FUNCTION_1";}\r
+                               fixed: 1 1;\r
+                               align: 0.5 0.5;\r
+                               color: 255 255 255 255;\r
+                               text {\r
+                                       font: "SLP:style=Bold";\r
+                                       text_class: "slp";\r
+                                       text: "?123";\r
+                                       size: 26;\r
+                                       min:  0 0;\r
+                                       align: 0.5 0.5;\r
+                               }\r
+                       }\r
+                       description {\r
+                               state: "mode_3_4" 0.0;\r
+                               inherit: "default" 0.0;\r
+                               text {\r
+                                       text: "abc";\r
+                               }\r
+                       }\r
+               }\r
+\r
+               part {\r
+                       name: "FUNCTION_2";\r
+                       type: IMAGE;\r
+                       scale: 1;\r
+                       mouse_events: 1;\r
+                       description {\r
+                               state: "default" 0.0;\r
+                               rel1 { relative: KEYPAD_REL_W(4) KEYPAD_REL_H(334); to:"keypad.bg";}\r
+                               rel2 { relative: KEYPAD_REL_W(4+86) KEYPAD_REL_H(334+KEYPAD_BUTTON_HEIGHT); to:"keypad.bg"; }\r
+                               color: 255 255 255 255;\r
+                               image {\r
+                                       normal: "RB07_key_btn_02.png";\r
+                                       border: 9 9 9 9;\r
+                                       border_scale: 1;\r
+                               }\r
+                       }\r
+                       description {\r
+                               state: "pressed" 0.0;\r
+                               inherit: "default" 0.0;\r
+                               image.normal: "RB07_key_btn_perss.png";\r
+                       }\r
+                       description {\r
+                               state: "hide" 0.0;\r
+                               visible: 0;\r
+                       }\r
+               }\r
+               part {\r
+                       name: "FUNCTION_2_icon";\r
+                       type: IMAGE;\r
+                       scale: 1;\r
+                       mouse_events: 1;\r
+                       repeat_events: 1;\r
+                       description {\r
+                               state: "default" 0.0;\r
+                               min: 50 50;\r
+                               rel1 { relative: 0.5 0.5; to:"FUNCTION_2";}\r
+                               rel2 { relative: 0.5 0.5; to:"FUNCTION_2"; }\r
+                               color: 255 255 255 255;\r
+                               image {\r
+                                       normal: "RB07_icon_shift_normal.png";\r
+                               }\r
+                       }\r
+                       description {\r
+                               state: "mode_3_4" 0.0;\r
+                               inherit: "default" 0.0;\r
+                               visible: 0;\r
+                       }\r
+                       description {\r
+                               state: "pressed" 0.0;\r
+                               inherit: "default" 0.0;\r
+                               image {\r
+                                       normal: "RB07_icon_shift_focused.png";\r
+                               }\r
+                       }\r
+                       description {\r
+                               state: "hide" 0.0;\r
+                               visible: 0;\r
+                       }\r
+               }\r
+               part {\r
+                       name: "FUNCTION_2_TEXT";\r
+                       type: TEXT;\r
+                       scale: 1;\r
+                       effect: SHADOW;\r
+                       mouse_events: 0;\r
+                       repeat_events: 1;\r
+                       description {\r
+                               state: "default" 0.0;\r
+                               rel1 { relative: 0.0 KEYPAD_BUTTON_REL_H(0); to: "FUNCTION_2";}\r
+                               rel2 { relative: 1.0 KEYPAD_BUTTON_REL_H(KEYPAD_BUTTON_HEIGHT); to: "FUNCTION_2";}\r
+                               fixed: 1 1;\r
+                               align: 0.5 0.5;\r
+                               color: 255 255 255 255;\r
+                               text {\r
+                                       font: "SLP:style=Bold";\r
+                                       text_class: "slp";\r
+                                       text: " ";\r
+                                       size: 26;\r
+                                       min:  0 0;\r
+                                       align: 0.5 0.5;\r
+                               }\r
+                       }\r
+                       description {\r
+                               state: "mode_3_4_1" 0.0;\r
+                               inherit: "default" 0.0;\r
+                               text {\r
+                                       text: "1/2";\r
+                               }\r
+                       }\r
+                       description {\r
+                               state: "mode_3_4_2" 0.0;\r
+                               inherit: "default" 0.0;\r
+                               text {\r
+                                       text: "2/2";\r
+                               }\r
+                       }\r
+               }\r
+\r
+               part {\r
+                       name: "FUNCTION_3";\r
+                       type: IMAGE;\r
+                       scale: 1;\r
+                       mouse_events: 1;\r
+                       description {\r
+                               state: "default" 0.0;\r
+                               rel1 { relative: KEYPAD_REL_W(628) KEYPAD_REL_H(334); to:"keypad.bg";}\r
+                               rel2 { relative: KEYPAD_REL_W(628+86) KEYPAD_REL_H(334+KEYPAD_BUTTON_HEIGHT); to:"keypad.bg"; }\r
+                               color: 255 255 255 255;\r
+                               image {\r
+                                       normal: "RB07_key_btn_02.png";\r
+                                       border: 9 9 9 9;\r
+                                       border_scale: 1;\r
+                               }\r
+                       }\r
+                       description {\r
+                               state: "pressed" 0.0;\r
+                               inherit: "default" 0.0;\r
+                               image.normal: "RB07_key_btn_perss.png";\r
+                       }\r
+                       description {\r
+                               state: "hide" 0.0;\r
+                               visible: 0;\r
+                       }\r
+               }\r
+               part {\r
+                       name: "FUNCTION_3_icon";\r
+                       type: IMAGE;\r
+                       scale: 1;\r
+                       mouse_events: 1;\r
+                       repeat_events: 1;\r
+                       description {\r
+                               state: "default" 0.0;\r
+                               min: 50 50;\r
+                               rel1 { relative: 0.5 0.5; to:"FUNCTION_3";}\r
+                               rel2 { relative: 0.5 0.5; to:"FUNCTION_3"; }\r
+                               color: 255 255 255 255;\r
+                               image {\r
+                                       normal: "RB07_icon_back_normal.png";\r
+                               }\r
+                       }\r
+                       description {\r
+                               state: "pressed" 0.0;\r
+                               inherit: "default" 0.0;\r
+                               image {\r
+                                       normal: "RB07_icon_back_press.png";\r
+                               }\r
+                       }\r
+               }\r
+\r
+               part {\r
+                       name: "FUNCTION_4";\r
+                       type: IMAGE;\r
+                       scale: 1;\r
+                       mouse_events: 1;\r
+                       description {\r
+                               state: "default" 0.0;\r
+                               rel1 { relative: KEYPAD_REL_W(616) KEYPAD_REL_H(442); to:"keypad.bg";}\r
+                               rel2 { relative: KEYPAD_REL_W(616+98) KEYPAD_REL_H(442+KEYPAD_BUTTON_HEIGHT); to:"keypad.bg"; }\r
+                               color: 255 255 255 255;\r
+                               image {\r
+                                       normal: "RB07_key_btn_02.png";\r
+                                       border: 9 9 9 9;\r
+                                       border_scale: 1;\r
+                               }\r
+                       }\r
+                       description {\r
+                               state: "pressed" 0.0;\r
+                               inherit: "default" 0.0;\r
+                               image.normal: "RB07_key_btn_perss.png";\r
+                       }\r
+                       description {\r
+                               state: "hide" 0.0;\r
+                               visible: 0;\r
+                       }\r
+               }\r
+               part {\r
+                       name: "FUNCTION_4_icon";\r
+                       type: IMAGE;\r
+                       scale: 1;\r
+                       mouse_events: 1;\r
+                       repeat_events: 1;\r
+                       description {\r
+                               state: "default" 0.0;\r
+                               min: 50 50;\r
+                               rel1 { relative: 0.5 0.5; to:"FUNCTION_4";}\r
+                               rel2 { relative: 0.5 0.5; to:"FUNCTION_4"; }\r
+                               color: 255 255 255 255;\r
+                               image {\r
+                                       normal: "RB07_icon_enter.png";\r
+                               }\r
+                       }\r
+                       description {\r
+                               state: "pressed" 0.0;\r
+                               inherit: "default" 0.0;\r
+                               image {\r
+                                       normal: "RB07_icon_enter.png";\r
+                               }\r
+                       }\r
+               }\r
+\r
+               part {\r
+                       name: "FUNCTION_5";\r
+                       type: IMAGE;\r
+                       scale: 1;\r
+                       mouse_events: 1;\r
+                       description {\r
+                               state: "default" 0.0;\r
+                               rel1 { relative: KEYPAD_REL_W(4+98+10+98+10+62+10) KEYPAD_REL_H(442); to:"keypad.bg";}\r
+                               rel2 { relative: KEYPAD_REL_W(544-10) KEYPAD_REL_H(442+KEYPAD_BUTTON_HEIGHT); to:"keypad.bg"; }\r
+                               color: 255 255 255 255;\r
+                               image {\r
+                                       normal: "RB07_key_btn_02.png";\r
+                                       border: 9 9 9 9;\r
+                                       border_scale: 1;\r
+                               }\r
+                       }\r
+                       description {\r
+                               state: "pressed" 0.0;\r
+                               inherit: "default" 0.0;\r
+                               image.normal: "RB07_key_btn_perss.png";\r
+                       }\r
+                       description {\r
+                               state: "hide" 0.0;\r
+                               visible: 0;\r
+                       }\r
+               }\r
+               part {\r
+                       name: "FUNCTION_5_icon";\r
+                       type: IMAGE;\r
+                       scale: 1;\r
+                       mouse_events: 1;\r
+                       repeat_events: 1;\r
+                       description {\r
+                               state: "default" 0.0;\r
+                               min: 82 28;\r
+                               rel1 { relative: 0.5 0.5; to:"FUNCTION_5";}\r
+                               rel2 { relative: 0.5 0.5; to:"FUNCTION_5"; }\r
+                               color: 255 255 255 255;\r
+                               image {\r
+                                       normal: "RB07_icon_space.png";\r
+                               }\r
+                       }\r
+                       description {\r
+                               state: "pressed" 0.0;\r
+                               inherit: "default" 0.0;\r
+                               image {\r
+                                       normal: "RB07_icon_space.png";\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+\r
+       programs {\r
+               program {\r
+                       name: "init_keypad";\r
+                       signal: "load";\r
+                       script{\r
+                               init_qwerty_keypad();\r
+                       }\r
+               }\r
+               PROG_KEYPAD_PLAIN_BUTTON("0")\r
+               PROG_KEYPAD_PLAIN_BUTTON("1")\r
+               PROG_KEYPAD_PLAIN_BUTTON("2")\r
+               PROG_KEYPAD_PLAIN_BUTTON("3")\r
+               PROG_KEYPAD_PLAIN_BUTTON("4")\r
+               PROG_KEYPAD_PLAIN_BUTTON("5")\r
+               PROG_KEYPAD_PLAIN_BUTTON("6")\r
+               PROG_KEYPAD_PLAIN_BUTTON("7")\r
+               PROG_KEYPAD_PLAIN_BUTTON("8")\r
+               PROG_KEYPAD_PLAIN_BUTTON("9")\r
+               PROG_KEYPAD_PLAIN_BUTTON("10")\r
+               PROG_KEYPAD_PLAIN_BUTTON("11")\r
+               PROG_KEYPAD_PLAIN_BUTTON("12")\r
+               PROG_KEYPAD_PLAIN_BUTTON("13")\r
+               PROG_KEYPAD_PLAIN_BUTTON("14")\r
+               PROG_KEYPAD_PLAIN_BUTTON("15")\r
+               PROG_KEYPAD_PLAIN_BUTTON("16")\r
+               PROG_KEYPAD_PLAIN_BUTTON("17")\r
+               PROG_KEYPAD_PLAIN_BUTTON("18")\r
+               PROG_KEYPAD_PLAIN_BUTTON("19")\r
+               PROG_KEYPAD_PLAIN_BUTTON("20")\r
+               PROG_KEYPAD_PLAIN_BUTTON("21")\r
+               PROG_KEYPAD_PLAIN_BUTTON("22")\r
+               PROG_KEYPAD_PLAIN_BUTTON("23")\r
+               PROG_KEYPAD_PLAIN_BUTTON("24")\r
+               PROG_KEYPAD_PLAIN_BUTTON("25")\r
+               PROG_KEYPAD_PLAIN_BUTTON("26")\r
+               PROG_KEYPAD_PLAIN_BUTTON("27")\r
+               PROG_KEYPAD_PLAIN_BUTTON("28")\r
+               PROG_KEYPAD_PLAIN_BUTTON("29")\r
+               PROG_KEYPAD_PLAIN_BUTTON("30")\r
+               PROG_KEYPAD_PLAIN_BUTTON("31")\r
+               PROG_KEYPAD_PLAIN_BUTTON("32")\r
+               PROG_KEYPAD_PLAIN_BUTTON("33")\r
+               PROG_KEYPAD_PLAIN_BUTTON("34")\r
+               PROG_KEYPAD_PLAIN_BUTTON("35")\r
+               PROG_KEYPAD_PLAIN_BUTTON("36")\r
+               PROG_KEYPAD_PLAIN_BUTTON("37")\r
+\r
+               PROG_BUTTON_REACTION("FUNCTION_0")\r
+               PROG_BUTTON_REACTION("FUNCTION_1")\r
+               PROG_BUTTON_REACTION("FUNCTION_2")\r
+               PROG_BUTTON_REACTION("FUNCTION_3")\r
+               PROG_BUTTON_REACTION("FUNCTION_4")\r
+               PROG_BUTTON_REACTION("FUNCTION_5")\r
+\r
+               program {\r
+                       name: "clicked_FUNCTION_0";\r
+                       signal: "mouse,clicked,1";\r
+                       source: "FUNCTION_0";\r
+                       script{\r
+                               emit("pad_qwerty_clicked", "SOS");\r
+                       }\r
+               }\r
+               program {\r
+                       name: "clicked_FUNCTION_1";\r
+                       signal: "mouse,clicked,1";\r
+                       source: "FUNCTION_1";\r
+                       script{\r
+                               new current_mode = get_int(g_key_mode);\r
+\r
+                               if (current_mode == MODE_ALPHA_LOWER || current_mode == MODE_ALPHA_UPPER) {\r
+                                       switch_input_mode(MODE_SYMBOL_1);\r
+                                       set_state(PART:"FUNCTION_1_TEXT", "mode_3_4", 0.0);\r
+                                       set_state(PART:"FUNCTION_2_icon", "hide", 0.0);\r
+                                       set_state(PART:"FUNCTION_2_TEXT", "mode_3_4_1", 0.0);\r
+                                       set_state(PART:"keypad.bg.image", "small", 0.0);\r
+                               }\r
+                               if (current_mode == MODE_SYMBOL_1 || current_mode == MODE_SYMBOL_2) {\r
+                                       switch_input_mode(MODE_ALPHA_LOWER);\r
+                                       set_state(PART:"FUNCTION_1_TEXT", "default", 0.0);\r
+                                       set_state(PART:"FUNCTION_2_icon", "default", 0.0);\r
+                                       set_state(PART:"FUNCTION_2_TEXT", "default", 0.0);\r
+                                       set_state(PART:"keypad.bg.image", "default", 0.0);\r
+                               }\r
+\r
+                               emit("pad_qwerty_clicked", "function1");\r
+                       }\r
+               }\r
+               program {\r
+                       name: "clicked_FUNCTION_2";\r
+                       signal: "mouse,clicked,1";\r
+                       source: "FUNCTION_2";\r
+                       script{\r
+                               new current_mode = get_int(g_key_mode);\r
+\r
+                               if (current_mode == MODE_ALPHA_LOWER) {\r
+                                       switch_input_mode(MODE_ALPHA_UPPER);\r
+                                       set_state(PART:"FUNCTION_2_icon", "pressed", 0.0);\r
+                                       set_state(PART:"FUNCTION_2_TEXT", "default", 0.0);\r
+                               }\r
+                               if (current_mode == MODE_ALPHA_UPPER) {\r
+                                       switch_input_mode(MODE_ALPHA_LOWER);\r
+                                       set_state(PART:"FUNCTION_2_icon", "default", 0.0);\r
+                                       set_state(PART:"FUNCTION_2_TEXT", "default", 0.0);\r
+                               }\r
+                               if (current_mode == MODE_SYMBOL_1) {\r
+                                       switch_input_mode(MODE_SYMBOL_2);\r
+                                       set_state(PART:"FUNCTION_2_icon", "hide", 0.0);\r
+                                       set_state(PART:"FUNCTION_2_TEXT", "mode_3_4_2", 0.0);\r
+                               }\r
+                               if (current_mode == MODE_SYMBOL_2) {\r
+                                       switch_input_mode(MODE_SYMBOL_1);\r
+                                       set_state(PART:"FUNCTION_2_icon", "hide", 0.0);\r
+                                       set_state(PART:"FUNCTION_2_TEXT", "mode_3_4_1", 0.0);\r
+                               }\r
+\r
+                               emit("pad_qwerty_clicked", "function2");\r
+                       }\r
+               }\r
+               program {\r
+                       name: "clicked_FUNCTION_3";\r
+                       signal: "mouse,clicked,1";\r
+                       source: "FUNCTION_3";\r
+                       script{\r
+                               emit("pad_qwerty_clicked", "bs");\r
+                       }\r
+               }\r
+               program {\r
+                       name: "clicked_FUNCTION_4";\r
+                       signal: "mouse,clicked,1";\r
+                       source: "FUNCTION_4";\r
+                       script{\r
+                               emit("pad_qwerty_clicked", "enter");\r
+                       }\r
+               }\r
+               program {\r
+                       name: "clicked_FUNCTION_5";\r
+                       signal: "mouse,clicked,1";\r
+                       source: "FUNCTION_5";\r
+                       script{\r
+                               emit("pad_qwerty_clicked", "space");\r
+                       }\r
+               }\r
+       }\r
+}\r
diff --git a/data/groups/lock-info.edc b/data/groups/lock-info.edc
new file mode 100755 (executable)
index 0000000..d8dd236
--- /dev/null
@@ -0,0 +1,242 @@
+/*
+ * 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 INFO_WIDTH 720
+#define INFO_HEIGHT 382
+
+       group{
+               name: "lock-info";
+               parts{
+                       part{
+                               name: "info.bg";
+                               type: RECT;
+                               mouse_events: 0;
+                               description{
+                                       state: "default" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part{
+                               name: "rect.clock";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description{
+                                       state: "default" 0.0;
+                                       color: 0 0 0 0;
+                                       rel1{
+                                               relative: 24/INFO_WIDTH 0.0;
+                                               to: "info.bg";
+                                       }
+                                       rel2{
+                                               relative: 376/INFO_WIDTH 122/INFO_HEIGHT;
+                                               to: "info.bg";
+                                       }
+                               }
+                       }
+                       part{
+                               name: "rect.clock.ampm";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description{
+                                       state: "default" 0.0;//for 10:07 hour>=10
+                                       color: 0 0 0 0;
+                                       rel1{
+                                               relative: 376/INFO_WIDTH (122-54)/INFO_HEIGHT);
+                                               to: "info.bg";
+                                       }
+                                       rel2{
+                                               relative: 1.0 122/INFO_HEIGHT;
+                                               to: "info.bg";
+                                       }
+                               }
+                               description{
+                                       state: "digit" 1.0;//for 1:07 hour<10
+                                       color: 0 0 0 0;
+                                       rel1{
+                                               relative: (376-78)/INFO_WIDTH (122-54)/INFO_HEIGHT);
+                                               to: "info.bg";
+                                       }
+                                       rel2{
+                                               relative: 1.0 122/INFO_HEIGHT;
+                                               to: "info.bg";
+                                       }
+                               }
+                       }
+                       part{
+                               name: "rect.date";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description{
+                                       state: "default" 0.0;
+                                       color: 0 0 0 0;
+                                       rel1{
+                                               relative: 36/INFO_WIDTH (122+64-38)/INFO_HEIGHT;//the height of date is 38
+                                               to: "info.bg";
+                                       }
+                                       rel2{
+                                               relative: 1.0 (122+64)/INFO_HEIGHT;
+                                               to: "info.bg";
+                                       }
+                               }
+                       }
+                       part{
+                               name: "txt.clock";
+                               type: TEXT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description{
+                                       state: "default" 0.0;
+                                       color: 255 255 255 255;
+                                       rel1{
+                                               to: "rect.clock";
+                                       }
+                                       rel2{
+                                               to: "rect.clock";
+                                       }
+                                       text{
+                                               font: "SLP:style=Medium";
+                                               text_class: "slp";
+                                               size: 130;
+                                               align: 0.0 0.5;
+                                       }
+                               }
+                       }
+                       part{
+                               name: "txt.clock.ampm";
+                               type: TEXT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description{
+                                       state: "default" 0.0;
+                                       color: 255 255 255 255;
+                                       rel1{
+                                               to: "rect.clock.ampm";
+                                       }
+                                       rel2{
+                                               to: "rect.clock.ampm";
+                                       }
+                                       text{
+                                               font: "SLP:style=Medium";
+                                               text_class: "slp";
+                                               size: 46;
+                                               align: 0.0 0.5;
+                                       }
+                               }
+                       }
+                       part{
+                               name: "txt.date";
+                               type: TEXT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description{
+                                       state: "default" 0.0;
+                                       color: 255 255 255 255;
+                                       rel1{
+                                               to: "rect.date";
+                                       }
+                                       rel2{
+                                               to: "rect.date";
+                                       }
+                                       text{
+                                               font: "SLP:style=Medium";
+                                               text_class: "slp";
+                                               size: 40;
+                                               align: 0.0 0.5;
+                                       }
+                               }
+                       }
+                       part{
+                               name: "rect.helptext";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description{
+                                       state: "default" 0.0;
+                                       color: 0 0 0 0;
+                                       rel1{
+                                               relative: 0.0 349/INFO_HEIGHT;
+                                               to: "info.bg";
+                                       }
+                                       rel2{
+                                               relative: 1.0 1.0;
+                                               to: "info.bg";
+                                       }
+                               }
+                       }
+                       part{
+                               name: "txt.helptext";
+                               type: TEXT;
+                               scale: 1;
+                               mouse_events: 0;
+                               effect: FAR_SHADOW;
+                               description{
+                                       state: "default" 0.0;
+                                       color: 255 255 255 255;
+                                       rel1{
+                                               to: "rect.helptext";
+                                       }
+                                       rel2{
+                                               to: "rect.helptext";
+                                       }
+                                       text{
+                                               font: "SLP:style=Medium";
+                                               text_class: "slp";
+                                               size: 32;
+                                               align: 0.5 1.0;
+                                       }
+                               }
+                               description{
+                                       state: "invisible" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+               }
+
+               programs{
+                       program{
+                               name: "digit,clock";
+                               signal: "digit,clock";
+                               source: "rect.clock.ampm";
+                               action: STATE_SET "digit" 1.0;
+                               target: "rect.clock.ampm";
+                       }
+                       program{
+                               name: "default,clock";
+                               signal: "default,clock";
+                               source: "rect.clock.ampm";
+                               action: STATE_SET "default" 0.0;
+                               target: "rect.clock.ampm";
+                       }
+                       program{
+                               name: "visible,helptext";
+                               signal: "visible,helptext";
+                               source: "txt.helptext";
+                               action: STATE_SET "default" 0.0;
+                               target: "txt.helptext";
+                       }
+                       program{
+                               name: "invisible,helptext";
+                               signal: "invisible,helptext";
+                               source: "txt.helptext";
+                               action: STATE_SET "invisible" 0.0;
+                               target: "txt.helptext";
+                       }
+               }
+       }
diff --git a/data/groups/lock-main.edc b/data/groups/lock-main.edc
new file mode 100755 (executable)
index 0000000..a13397d
--- /dev/null
@@ -0,0 +1,268 @@
+/*
+ * 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 WIDTH 720
+#define HEIGHT 1280
+
+#define PROG_PART_SHOW_HIDE(part_name)\
+               program{\
+                       name: "show,"part_name;\
+                       signal: "show,"part_name;\
+                       source: part_name;\
+                       action: STATE_SET "default" 0.0;\
+                       target: part_name;\
+               }\
+               program{\
+                       name: "hide,"part_name;\
+                       signal: "hide,"part_name;\
+                       source: part_name;\
+                       action: STATE_SET "hidden" 0.0;\
+                       target: part_name;\
+               }\
+
+       group{
+               name: "lock-main";
+               parts{
+                       part{
+                               name: "clipper";
+                               type: RECT;
+                               description{
+                                       state : "default" 0.0;
+                               }
+                               description{
+                                       state : "transit" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part{
+                               name: "bg";
+                               type: RECT;
+                               clip_to: "clipper";
+                               description{
+                                       state : "default" 0.0;
+                                       color: 0 0 0 255;
+                               }
+                               description{
+                                       state : "transit" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part{
+                               name: "sw.bg";
+                               type: SWALLOW;
+                               scale: 1;
+                               mouse_events: 1;
+                               clip_to: "clipper";
+                               description{
+                                       state: "default" 0.0;
+                                       rel1{
+                                               to: "bg";
+                                       }
+                                       rel2{
+                                               to: "bg";
+                                       }
+                               }
+                       }
+                       part{
+                               name: "text.area";
+                               type: TEXT;
+                               scale: 1;
+                               mouse_events: 0;
+                               clip_to: "clipper";
+                               description{
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       color: 255 255 255 255;
+                                       rel1{
+                                               relative: 36/WIDTH (62+64)/HEIGHT;
+                                               to: "bg";
+                                       }
+                                       rel2{
+                                               relative: (WIDTH-36)/WIDTH (62+64+140)/HEIGHT;
+                                               to: "bg";
+                                       }
+                                       text{
+                                               font: "SLP:style=Medium";
+                                               text_class: "slp";
+                                               size: 100;
+                                               align: 0.0 0.5;
+                                               text: "Life Magazine";
+                                       }
+                               }
+                               description{
+                                       state: "hidden" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+                       part{
+                               name: "sw.noti";
+                               type: SWALLOW;
+                               scale: 1;
+                               mouse_events: 0;
+                               description{
+                                       state: "default" 0.0;
+                                       fixed: 1 1;
+                                       min: 0 144;
+                                       visible: 1;
+                                       rel1{relative: 36/WIDTH 1.0; to_x: "bg"; to_y: "text.area"; offset: 0 110; }
+                                       rel2{relative: (WIDTH-36)/WIDTH 1.0; to_x: "bg"; to_y: "text.area";}
+                               }
+                               description{
+                                       state: "hidden" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+                       part{
+                               name: "sim.state";
+                               type: TEXT;
+                               scale: 1;
+                               mouse_events: 0;
+                               clip_to: "clipper";
+                               description{
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       color: 255 255 255 255;
+                                       rel1{
+                                               relative: 36/WIDTH (30+20)/HEIGHT;//for it covers indicator, so move done 20 pixels
+                                               to: "bg";
+                                       }
+                                       rel2{
+                                               relative: 1.0 (62+20)/HEIGHT;
+                                               to: "bg";
+                                       }
+                                       text{
+                                               font: "SLP:style=Bold";
+                                               text_class: "slp";
+                                               size: 26;
+                                               align: 0.0 0.5;
+                                       }
+                               }
+                               description{
+                                       state: "hidden" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+                       part{
+                               name: "rect.info";
+                               type: SWALLOW;
+                               scale: 1;
+                               mouse_events: 0;
+                               clip_to: "clipper";
+                               description{
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       color: 0 0 0 0;
+                                       rel1{
+                                               relative: 0.0 898/HEIGHT;
+                                               to: "bg";
+                                       }
+                                       rel2{
+                                               relative: 1.0 1.0;
+                                               to: "bg";
+                                       }
+                               }
+                               description{
+                                       state: "up" 1.0;
+                                       visible: 1;
+                                       color: 0 0 0 0;
+                                       rel1{
+                                               relative: 0.0 (898-110)/HEIGHT;
+                                               to: "bg";
+                                       }
+                                       rel2{
+                                               relative: 1.0 (1280-110)/HEIGHT;
+                                               to: "bg";
+                                       }
+                               }
+                               description{
+                                       state: "hidden" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+                       part{
+                               name: "dim.bg";
+                               type: SWALLOW;
+                               scale: 1;
+                               mouse_events: 1;
+                               description{
+                                       state: "default" 0.0;
+                                       color: 0 0 0 0;
+                                       rel1{
+                                               to: "bg";
+                                       }
+                                       rel2{
+                                               to: "bg";
+                                       }
+                               }
+                       }
+                       part{
+                               name: "sw.phone-lock";
+                               type: SWALLOW;
+                               scale: 1;
+                               mouse_events: 1;
+                               description{
+                                       state: "default" 0.0;
+                                       color: 0 0 0 0;
+                                       rel1{
+                                               to: "bg";
+                                       }
+                                       rel2{
+                                               to: "bg";
+                                       }
+                               }
+                       }
+               }
+               programs{
+                       program{
+                               name: "transit,clipper";
+                               signal: "transit,clipper";
+                               source: "clipper";
+                               action: STATE_SET "transit" 0.0;
+                               target: "bg";
+                               target: "clipper";
+                               transition: LINEAR 0.5;
+                               after: "exit,app";
+                       }
+                       program{
+                               name: "exit,app";
+                               signal: "exit,app";
+                               source: "clipper";
+                               action: SIGNAL_EMIT "exit,app" "event";
+                       }
+                       program{
+                               name: "flick,up";
+                               signal: "flick,up";
+                               source: "rect.info";
+                               action: STATE_SET "up" 1.0;
+                               target: "rect.info";
+                       }
+                       program{
+                               name: "flick,down";
+                               signal: "flick,down";
+                               source: "rect.info";
+                               action: STATE_SET "default" 0.0;
+                               target: "rect.info";
+                       }
+                       PROG_PART_SHOW_HIDE("text.area")
+                       PROG_PART_SHOW_HIDE("sw.noti")
+                       PROG_PART_SHOW_HIDE("sim.state")
+                       PROG_PART_SHOW_HIDE("rect.info")
+               }
+       }
diff --git a/data/groups/lock-noti.edc b/data/groups/lock-noti.edc
new file mode 100755 (executable)
index 0000000..1ca54ac
--- /dev/null
@@ -0,0 +1,52 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the License);\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *  http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an AS IS BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#define NOTI_TEXTS_PART(num, topart)\\r
+       part{\\r
+               name: "noti_title"num;\\r
+               type: TEXT;\\r
+               scale: 1;\\r
+               description{\\r
+                       state: "default" 0.0;\\r
+                       rel1 { relative: 0.0 48*(num-1)/144; to: topart; }\\r
+                       rel2 { relative: 1.0 48*num/144; to: topart; }\\r
+                       text {\\r
+                                       text: "";\\r
+                                       font: "SLP:style=Medium";\\r
+                                       text_class: "slp_medium";\\r
+                                       size: 36;\\r
+                                       align: 0.0 0.5;\\r
+                       }\\r
+                       color: 255 255 255 127;\\r
+               }\\r
+       }\\r
+\r
+group{\r
+       name: "lock-noti";\r
+       parts{\r
+               part{\r
+                       name: "bg";\r
+                       type: RECT;\r
+                       description{\r
+                               state: "default" 0.0;\r
+                               visible: 0;\r
+                       }\r
+               }\r
+               NOTI_TEXTS_PART(1, "bg")\r
+               NOTI_TEXTS_PART(2, "bg")\r
+               NOTI_TEXTS_PART(3, "bg")\r
+       }\r
+}\r
diff --git a/data/groups/lock-simple-password.edc b/data/groups/lock-simple-password.edc
new file mode 100755 (executable)
index 0000000..13da98e
--- /dev/null
@@ -0,0 +1,376 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the License);\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *  http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an AS IS BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#define NUMBER_KEYPAD_PANEL_WIDTH      636\r
+#define NUMBER_KEYPAD_PANEL_HEIGHT     656\r
+#define NUMBER_KEYPAD_BUTTON_WIDTH     194\r
+#define NUMBER_KEYPAD_BUTTON_HEIGHT    194\r
+#define NUMBER_KEYPAD_BUTTON_PAD_X     27\r
+#define NUMBER_KEYPAD_BUTTON_PAD_Y     40\r
+#define NUMBER_KEYPAD_REL_W(x)         ((x)/NUMBER_KEYPAD_PANEL_WIDTH)\r
+#define NUMBER_KEYPAD_REL_H(y)         ((y)/NUMBER_KEYPAD_PANEL_HEIGHT)\r
+#define NUMBER_KEYPAD_BUTTON_REL_W(x)  ((x)/NUMBER_KEYPAD_BUTTON_WIDTH)\r
+#define NUMBER_KEYPAD_BUTTON_REL_H(y)  ((y)/NUMBER_KEYPAD_BUTTON_HEIGHT)\r
+\r
+#define PART_INPUT_PASSWORD(password_area, index, password_area_icon, password, password_icon) \\r
+                       part { \\r
+                               name: password_area; \\r
+                               type: IMAGE; \\r
+                               scale: 1; \\r
+                               mouse_events: 1; \\r
+                               description { \\r
+                                       state: "default" 0.0; \\r
+                                       rel1 { relative: (72+144*(index-1))/720 (122+110+6)/1280; to:"bg";} \\r
+                                       rel2 { relative: (72+144*index)/720 (122+110+6+144)/1280; to:"bg"; } \\r
+                                       image { \\r
+                                               normal: password_area_icon; \\r
+                                       } \\r
+                               } \\r
+                       } \\r
+                       part { \\r
+                               name: password; \\r
+                               type: IMAGE; \\r
+                               scale: 1; \\r
+                               mouse_events: 0; \\r
+                               repeat_events: 1; \\r
+                               description { \\r
+                                       state: "default" 0.0; \\r
+                                       visible: 0; \\r
+                                       max: 52 48;\\r
+                                       rel1 { relative: 0.0 0.0; to: password_area;} \\r
+                                       rel2 { relative: 1.0 1.0; to: password_area;} \\r
+                                       align: 0.5 0.5; \\r
+                                       image { \\r
+                                               normal: password_icon; \\r
+                                       } \\r
+                               } \\r
+                               description { \\r
+                                       state: "show" 0.0; \\r
+                                       inherit: "default" 0.0; \\r
+                                       visible: 1; \\r
+                               } \\r
+                       }\r
+\r
+#define PROG_PASSWORD_SHOW_HIDE(password) \\r
+                       program{\\r
+                               name: "show,"password;\\r
+                               signal: "show,"password;\\r
+                               source: password;\\r
+                               action: STATE_SET "show" 0.0;\\r
+                               target: password;\\r
+                       }\\r
+                       program{\\r
+                               name: "hide,"password;\\r
+                               signal: "hide,"password;\\r
+                               source: password;\\r
+                               action: STATE_SET "default" 0.0;\\r
+                               target: password;\\r
+                       }\\r
+\r
+#define PART_KEYPAD_BUTTON_NUMBER(keypad_button, offx, offy, default_icon, press_icon, button_text, button_text_font, button_text_size) \\r
+                       part { \\r
+                               name: keypad_button; \\r
+                               type: IMAGE; \\r
+                               scale: 1; \\r
+                               mouse_events: 1; \\r
+                               description { \\r
+                                       state: "default" 0.0; \\r
+                                       rel1 { relative: NUMBER_KEYPAD_REL_W(offx) NUMBER_KEYPAD_REL_H(offy); to:"bg";} \\r
+                                       rel2 { relative: NUMBER_KEYPAD_REL_W(offx+NUMBER_KEYPAD_BUTTON_WIDTH) NUMBER_KEYPAD_REL_H(offy+NUMBER_KEYPAD_BUTTON_HEIGHT); to:"bg"; } \\r
+                                       color: 255 255 255 255; \\r
+                                       image { \\r
+                                               normal: default_icon; \\r
+                                               border: 9 9 9 9; \\r
+                                               border_scale: 1; \\r
+                                       } \\r
+                               } \\r
+                               description { \\r
+                                       state: "pressed" 0.0; \\r
+                                       inherit: "default" 0.0; \\r
+                                       image.normal: press_icon; \\r
+                               } \\r
+                               description { \\r
+                                       state: "hide" 0.0; \\r
+                                       visible: 0; \\r
+                               } \\r
+                       } \\r
+                       part { \\r
+                               name: keypad_button"_text"; \\r
+                               type: TEXT; \\r
+                               scale: 1; \\r
+                               effect: FAR_SHADOW; \\r
+                               mouse_events: 0; \\r
+                               repeat_events: 1; \\r
+                               description { \\r
+                                       state: "default" 0.0; \\r
+                                       rel1 { relative: 0.0 0.0; to: keypad_button;} \\r
+                                       rel2 { relative: 1.0 1.0; to: keypad_button;} \\r
+                                       fixed: 1 1; \\r
+                                       align: 0.5 0.5; \\r
+                                       color: 255 255 255 255; \\r
+                                       text { \\r
+                                               font: button_text_font; \\r
+                                               text: button_text; \\r
+                                               size: button_text_size; \\r
+                                               text_class: "slp";\\r
+                                               min: 0 0; \\r
+                                               align: 0.5 0.5; \\r
+                                       } \\r
+                               } \\r
+                               description { \\r
+                                       state: "hide" 0.0; \\r
+                                       visible: 0; \\r
+                               } \\r
+                       }\r
+\r
+#define PROG_KEYPAD_BUTTON(keypad_button) \\r
+                       program { \\r
+                               name: "down_"keypad_button; \\r
+                               signal: "mouse,down,*"; \\r
+                               source: keypad_button; \\r
+                               script { \\r
+                                       set_state(PART:keypad_button, "pressed", 0.0); \\r
+                                       emit("keypad_down", keypad_button); \\r
+                               } \\r
+                       } \\r
+                       program { \\r
+                               name: "ani_"keypad_button; \\r
+                               signal: "ani"; \\r
+                               source: keypad_button; \\r
+                               action: STATE_SET "default" 0.0; \\r
+                               transition: SINUSOIDAL 0.05; \\r
+                               target: keypad_button; \\r
+                       } \\r
+                       program { \\r
+                               name: "up_"keypad_button; \\r
+                               signal: "mouse,up,1"; \\r
+                               source: keypad_button; \\r
+                               script { \\r
+                                       emit("keypad_down_up", keypad_button); \\r
+                                       emit("ani", keypad_button); \\r
+                               } \\r
+                       } \\r
+                       program { \\r
+                               name: "clicked_"keypad_button; \\r
+                               signal: "mouse,clicked,1"; \\r
+                               source: keypad_button; \\r
+                               script { \\r
+                                       emit("keypad_down_clicked", keypad_button); \\r
+                               } \\r
+                       } \\r
+\r
+group{\r
+       name: "lock-simple-password";\r
+       images {\r
+               image: "ls_password_box_01.png" COMP;\r
+               image: "ls_password_star_01.png" COMP;\r
+       }\r
+\r
+       parts{\r
+               part{\r
+                       name: "bg";\r
+                       type: RECT;\r
+                       mouse_events: 1;\r
+                       description{\r
+                               state: "default" 0.0;\r
+                               color: 0 0 0 0;\r
+                       }\r
+               }\r
+               part{\r
+                       name: "txt.title";\r
+                       type: TEXT;\r
+                       scale: 1;\r
+                       mouse_events: 0;\r
+                       effect: FAR_SHADOW;\r
+                       description{\r
+                               state: "default" 0.0;\r
+                               color: 255 255 255 255;\r
+                               rel1 {relative: 0.0 122/1280; to: "bg";}\r
+                               rel2 {relative: 1.0 (122+110)/1280; to: "bg";}\r
+                               text{\r
+                                       font: "SLP:style=Medium";\r
+                                       text_class: "slp";\r
+                                       size: 36;\r
+                                       align: 0.5 0.5;\r
+                               }\r
+                       }\r
+               }\r
+               PART_INPUT_PASSWORD("password_box1", 1, "ls_password_box_01.png", "password1", "ls_password_star_01.png")\r
+               PART_INPUT_PASSWORD("password_box2", 2, "ls_password_box_01.png", "password2", "ls_password_star_01.png")\r
+               PART_INPUT_PASSWORD("password_box3", 3, "ls_password_box_01.png", "password3", "ls_password_star_01.png")\r
+               PART_INPUT_PASSWORD("password_box4", 4, "ls_password_box_01.png", "password4", "ls_password_star_01.png")\r
+               part{\r
+                       name: "txt.result";\r
+                       type: TEXT;\r
+                       scale: 1;\r
+                       mouse_events: 0;\r
+                       effect: FAR_SHADOW;\r
+                       description{\r
+                               state: "default" 0.0;\r
+                               min: 0 88;\r
+                               color: 255 255 255 255;\r
+                               rel1 {relative: 42/720 1.0; to_x: "bg"; to_y: "password_box1"; offset: 0 40;}\r
+                               rel2 {relative: (720-42)/720 1.0; to_x: "bg"; to_y: "password_box1"; offset: 0 40;}\r
+                               text{\r
+                                       font: "SLP:style=Medium";\r
+                                       text_class: "slp";\r
+                                       size: 36;\r
+                                       align: 0.5 0.5;\r
+                               }\r
+                       }\r
+               }\r
+               part{\r
+                       name: "sw.keypad.number";\r
+                       type: SWALLOW;\r
+                       scale: 1;\r
+                       mouse_events: 1;\r
+                       description{\r
+                               state: "default" 0.0;\r
+                               fixed: 0 1;\r
+                               align: 0.0 0.0;\r
+                               rel1{\r
+                                       relative: 42/720 (1280-55)/1280;\r
+                                       to: "bg";\r
+                               }\r
+                               rel2{\r
+                                       relative: (720-42)/720 (1280-55)/1280;\r
+                                       to: "bg";\r
+                               }\r
+                       }\r
+                       description{\r
+                               state: "show" 0.0;\r
+                               inherit: "default" 0.0;\r
+                               rel1{\r
+                                       relative: 42/720 (1280-55-656)/1280;\r
+                                       to: "bg";\r
+                               }\r
+                               rel2{\r
+                                       relative: (720-42)/720 (1280-55)/1280;\r
+                                       to: "bg";\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+\r
+       programs {\r
+               PROG_PASSWORD_SHOW_HIDE("password1")\r
+               PROG_PASSWORD_SHOW_HIDE("password2")\r
+               PROG_PASSWORD_SHOW_HIDE("password3")\r
+               PROG_PASSWORD_SHOW_HIDE("password4")\r
+               program{\r
+                       name: "show,numberkeyboard";\r
+                       signal: "show,numberkeyboard";\r
+                       source: "sw.keypad.number";\r
+                       action: STATE_SET "show" 0.0;\r
+                       target: "sw.keypad.number";\r
+                       transition: LINEAR 0.2;\r
+               }\r
+               program{\r
+                       name: "hide,numberkeyboard";\r
+                       signal: "hide,numberkeyboard";\r
+                       source: "sw.keypad.number";\r
+                       action: STATE_SET "default" 0.0;\r
+                       target: "sw.keypad.number";\r
+                       transition: LINEAR 0.2;\r
+                       after: "hide,simplepw";\r
+               }\r
+               program{\r
+                       name: "hide,simplepw";\r
+                       signal: "hide,simplepw";\r
+                       source: "sw.keypad.number";\r
+                       action: SIGNAL_EMIT "hide,simplepw" "event";\r
+               }\r
+       }\r
+}\r
+\r
+group{\r
+       name: "lock-keypad-number";\r
+       images {\r
+               image: "ls_button_default.png" COMP;\r
+               image: "ls_button_press.png" COMP;\r
+               image: "ls_button_sos_phone.png" COMP;\r
+               image: "ls_button_x.png" COMP;\r
+       }\r
+\r
+       parts{\r
+               part{\r
+                       name: "bg";\r
+                       type: RECT;\r
+                       mouse_events: 1;\r
+                       description{\r
+                               state: "default" 0.0;\r
+                               color: 0 0 0 0;\r
+                       }\r
+               }\r
+\r
+               PART_KEYPAD_BUTTON_NUMBER("1", 0, 0, "ls_button_default.png", "ls_button_press.png", "1", "SLP:style=Roman", 60)\r
+               PART_KEYPAD_BUTTON_NUMBER("2", NUMBER_KEYPAD_BUTTON_WIDTH+NUMBER_KEYPAD_BUTTON_PAD_X, 0, "ls_button_default.png", "ls_button_press.png", "2", "SLP:style=Roman", 60)\r
+               PART_KEYPAD_BUTTON_NUMBER("3", 2*(NUMBER_KEYPAD_BUTTON_WIDTH+NUMBER_KEYPAD_BUTTON_PAD_X), 0, "ls_button_default.png", "ls_button_press.png", "3", "SLP:style=Roman", 60)\r
+               PART_KEYPAD_BUTTON_NUMBER("4", 0, NUMBER_KEYPAD_BUTTON_HEIGHT-NUMBER_KEYPAD_BUTTON_PAD_Y, "ls_button_default.png", "ls_button_press.png", "4", "SLP:style=Roman", 60)\r
+               PART_KEYPAD_BUTTON_NUMBER("5", NUMBER_KEYPAD_BUTTON_WIDTH+NUMBER_KEYPAD_BUTTON_PAD_X, NUMBER_KEYPAD_BUTTON_HEIGHT-NUMBER_KEYPAD_BUTTON_PAD_Y, "ls_button_default.png", "ls_button_press.png", "5", "SLP:style=Roman", 60)\r
+               PART_KEYPAD_BUTTON_NUMBER("6", 2*(NUMBER_KEYPAD_BUTTON_WIDTH+NUMBER_KEYPAD_BUTTON_PAD_X), NUMBER_KEYPAD_BUTTON_HEIGHT-NUMBER_KEYPAD_BUTTON_PAD_Y, "ls_button_default.png", "ls_button_press.png", "6", "SLP:style=Roman", 60)\r
+               PART_KEYPAD_BUTTON_NUMBER("7", 0, 2*(NUMBER_KEYPAD_BUTTON_HEIGHT-NUMBER_KEYPAD_BUTTON_PAD_Y), "ls_button_default.png", "ls_button_press.png", "7", "SLP:style=Roman", 60)\r
+               PART_KEYPAD_BUTTON_NUMBER("8", NUMBER_KEYPAD_BUTTON_WIDTH+NUMBER_KEYPAD_BUTTON_PAD_X, 2*(NUMBER_KEYPAD_BUTTON_HEIGHT-NUMBER_KEYPAD_BUTTON_PAD_Y), "ls_button_default.png", "ls_button_press.png", "8", "SLP:style=Roman", 60)\r
+               PART_KEYPAD_BUTTON_NUMBER("9", 2*(NUMBER_KEYPAD_BUTTON_WIDTH+NUMBER_KEYPAD_BUTTON_PAD_X), 2*(NUMBER_KEYPAD_BUTTON_HEIGHT-NUMBER_KEYPAD_BUTTON_PAD_Y), "ls_button_default.png", "ls_button_press.png", "9", "SLP:style=Roman", 60)\r
+               PART_KEYPAD_BUTTON_NUMBER("SOS", 0, 3*(NUMBER_KEYPAD_BUTTON_HEIGHT-NUMBER_KEYPAD_BUTTON_PAD_Y), "ls_button_default.png", "ls_button_press.png", "", "SLP:style=Roman", 60)\r
+               PART_KEYPAD_BUTTON_NUMBER("0", NUMBER_KEYPAD_BUTTON_WIDTH+NUMBER_KEYPAD_BUTTON_PAD_X, 3*(NUMBER_KEYPAD_BUTTON_HEIGHT-NUMBER_KEYPAD_BUTTON_PAD_Y), "ls_button_default.png", "ls_button_press.png", "0", "SLP:style=Roman", 60)\r
+               PART_KEYPAD_BUTTON_NUMBER("Backspace", 2*(NUMBER_KEYPAD_BUTTON_WIDTH+NUMBER_KEYPAD_BUTTON_PAD_X), 3*(NUMBER_KEYPAD_BUTTON_HEIGHT-NUMBER_KEYPAD_BUTTON_PAD_Y), "ls_button_default.png", "ls_button_press.png", "", "SLP:style=Roman", 60)\r
+               part{\r
+                       name: "img.sos";\r
+                       type: IMAGE;\r
+                       scale: 1;\r
+                       mouse_events: 0;\r
+                       repeat_events: 1;\r
+                       description{\r
+                               max: 100 100;\r
+                               align: 0.5 0.5;\r
+                               rel1{relative: 0.0 0.0; to: "SOS";}\r
+                               rel2{relative: 1.0 1.0; to: "SOS";}\r
+                               image.normal: "ls_button_sos_phone.png";\r
+                       }\r
+               }\r
+               part{\r
+                       name: "img.cancel";\r
+                       type: IMAGE;\r
+                       scale: 1;\r
+                       mouse_events: 0;\r
+                       repeat_events: 1;\r
+                       description{\r
+                               state: "default" 0.0;\r
+                               max: 100 100;\r
+                               align: 0.5 0.5;\r
+                               rel1{relative: 0.0 0.0; to: "Backspace";}\r
+                               rel2{relative: 1.0 1.0; to: "Backspace";}\r
+                               image.normal: "ls_button_x.png";\r
+                       }\r
+               }\r
+       }\r
+\r
+       programs {\r
+               PROG_KEYPAD_BUTTON("1")\r
+               PROG_KEYPAD_BUTTON("2")\r
+               PROG_KEYPAD_BUTTON("3")\r
+               PROG_KEYPAD_BUTTON("4")\r
+               PROG_KEYPAD_BUTTON("5")\r
+               PROG_KEYPAD_BUTTON("6")\r
+               PROG_KEYPAD_BUTTON("7")\r
+               PROG_KEYPAD_BUTTON("8")\r
+               PROG_KEYPAD_BUTTON("9")\r
+               PROG_KEYPAD_BUTTON("SOS")\r
+               PROG_KEYPAD_BUTTON("0")\r
+               PROG_KEYPAD_BUTTON("Backspace")\r
+       }\r
+}\r
diff --git a/data/groups/lock-slider.edc b/data/groups/lock-slider.edc
new file mode 100755 (executable)
index 0000000..68dbf3a
--- /dev/null
@@ -0,0 +1,432 @@
+/*
+ * 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 DRAGSLIDER_ARROW_RECT(pname, rel1x, rel2x)\
+       part {\
+               name: "rect."#pname;\
+               type: RECT;\
+               scale: 1;\
+               description {\
+                       state: "default" 0.0;\
+                       rel1 {\
+                               relative: rel1x 0.0;\
+                               to: "rect.arrow";\
+                       }\
+                       rel2 {\
+                               relative: rel2x 1.0;\
+                               to: "rect.arrow";\
+                       }\
+                       visible: 0;\
+               }\
+       }\
+
+#define DRAGSLIDER_ARROW_IMAGE(pname, rname)\
+       part {\
+               name: "arrow."#pname;\
+               type: IMAGE;\
+               scale: 1;\
+               description {\
+                       state: "default" 0.0;\
+                       min: 23 29;\
+                       align: 0.5 0.5;\
+                       rel1 {\
+                               relative: 0.5 0.5;\
+                               to: "rect."#rname;\
+                       }\
+                       rel2 {\
+                               relative: 0.5 0.5;\
+                               to: "rect."#rname;\
+                       }\
+                       image.normal: "slider/RB07_icon_Unlock_arrow.png";\
+                       visible: 0;\
+               }\
+               description {\
+                       state: "press" 0.0;\
+                       inherit: "default" 0.0;\
+                       image.normal: "slider/RB07_icon_Unlock_arrow_press.png";\
+                       visible: 1;\
+               }\
+       }\
+
+#define DRAGSLIDER_LOCK_PRESS_DESC(pstate, file)\
+       description {\
+               state: #pstate 0.0;\
+               inherit: "default" 0.0;\
+               image.normal: #file;\
+               visible: 1;\
+       }\
+
+#define DRAGSLIDER_LOCK_PRESS_PROC(pname)\
+       program{\
+               name: #pname".lock.r";\
+               signal: #pname;\
+               source: "lock.image.r";\
+               action: STATE_SET #pname 0.0;\
+               target: "lock.image.r";\
+       }\
+
+group {
+       name: "lock-slider";
+
+       images {
+               image: "slider/RB07_Unlock_bg.png" COMP;
+               image: "slider/RB07_Unlock_bg_press.png" COMP;
+               image: "slider/RB07_icon_Unlock_01.png" COMP;
+               image: "slider/RB07_icon_Unlock_02.png" COMP;
+               image: "slider/RB07_icon_Unlock_arrow.png" COMP;
+               image: "slider/RB07_icon_Unlock_arrow_press.png" COMP;
+               image: "slider/RB07_icon_Unlock_press_01.png" COMP;
+               image: "slider/RB07_icon_Unlock_press_02.png" COMP;
+               image: "slider/RB07_icon_Unlock_press_03.png" COMP;
+               image: "slider/RB07_icon_Unlock_press_04.png" COMP;
+               image: "slider/RB07_icon_Unlock_press_05.png" COMP;
+               image: "slider/RB07_icon_Unlock_press_06.png" COMP;
+               image: "slider/RB07_icon_Unlock_press_07.png" COMP;
+               image: "slider/RB07_icon_Unlock_press_08.png" COMP;
+               image: "slider/RB07_icon_Unlock_press_09.png" COMP;
+               image: "slider/RB07_icon_Unlock_press_10.png" COMP;
+               image: "slider/RB07_icon_Unlock_press_11.png" COMP;
+               image: "slider/RB07_icon_Unlock_press_12.png" COMP;
+               image: "slider/RB07_icon_Unlock_press_13.png" COMP;
+               image: "slider/RB07_icon_Unlock_press_14.png" COMP;
+               image: "slider/RB07_icon_Unlock_press_15.png" COMP;
+       }
+
+       parts {
+               part {
+                       name: "bg";
+                       type: RECT;
+                       scale: 1;
+
+                       description {
+                               state: "default" 0.0;
+                               min: 0 114;
+                               color: 0 0 0 0;
+                       }
+               }
+
+               part {
+                       name: "image.bg";
+                       type: IMAGE;
+                       scale: 1;
+
+                       description {
+                               state: "default" 0.0;
+
+                               rel1 {
+                                       to: "bg";
+                               }
+                               rel2 {
+                                       to: "bg";
+                               }
+                               image.normal: "slider/RB07_Unlock_bg.png";
+                               visible: 0;
+                       }
+                       description {
+                               state: "press" 0.0;
+                               inherit: "default" 0.0;
+                               image.normal: "slider/RB07_Unlock_bg_press.png";
+                               visible: 1;
+                       }
+               }
+
+               part {
+                       name: "lock.padding.l";
+                       type: RECT;
+                       scale: 1;
+
+                       description {
+                               state: "default" 0.0;
+                               min: 47 0;
+                               align: 0.0 0.0;
+
+                               rel1 {
+                                       to: "bg";
+                               }
+                               rel2 {
+                                       relative: 0.0 1.0;
+                                       to: "bg";
+                               }
+                               visible: 0;
+                       }
+               }
+
+               part {
+                       name: "lock.padding.r";
+                       type: RECT;
+                       scale: 1;
+
+                       description {
+                               state: "default" 0.0;
+                               min: 46 0;
+                               align: 1.0 0.0;
+
+                               rel1 {
+                                       relative: 1.0 0.0;
+                                       to: "bg";
+                               }
+                               rel2 {
+                                       to: "bg";
+                               }
+                               visible: 0;
+                       }
+               }
+
+               part {
+                       name: "lock.wrapper.image.l";
+                       type: RECT;
+                       scale: 1;
+
+                       description {
+                               state: "default" 0.0;
+                               min: 119 119;
+                               align: 0.5 0.5;
+
+                               rel1 {
+                                       relative: 0.5 0.5;
+                                       to: "lock.image.l";
+                               }
+                               rel2 {
+                                       relative: 0.5 0.5;
+                                       to: "lock.image.l";
+                               }
+                               color: 0 0 0 0;
+                       }
+               }
+
+               part {
+                       name: "lock.image.l";
+                       type: IMAGE;
+                       scale: 1;
+
+                       description {
+                               state: "default" 0.0;
+                               min: 76 76;
+                               align: 0.0 0.5;
+
+                               rel1 {
+                                       relative: 1.0 0.5;
+                                       to_x: "lock.padding.l";
+                                       to_y: "bg";
+                               }
+                               rel2 {
+                                       relative: 1.0 0.5;
+                                       to_x: "lock.padding.l";
+                                       to_y: "bg";
+                               }
+                               image.normal: "slider/RB07_icon_Unlock_01.png";
+                       }
+                       description {
+                               state: "press" 0.0;
+                               inherit: "default" 0.0;
+                               image.normal: "slider/RB07_icon_Unlock_press_01.png";
+                       }
+               }
+
+               part {
+                       name: "lock.image.r";
+                       type: IMAGE;
+                       scale: 1;
+
+                       description {
+                               state: "default" 0.0;
+                               min: 76 76;
+                               align: 1.0 0.5;
+
+                               rel1 {
+                                       relative: 0.0 0.5;
+                                       to_x: "lock.padding.r";
+                                       to_y: "bg";
+                               }
+                               rel2 {
+                                       relative: 0.0 0.5;
+                                       to_x: "lock.padding.r";
+                                       to_y: "bg";
+                               }
+                               image.normal: "slider/RB07_icon_Unlock_02.png";
+                               visible: 0;
+                       }
+                       DRAGSLIDER_LOCK_PRESS_DESC(press02, slider/RB07_icon_Unlock_press_02.png);
+                       DRAGSLIDER_LOCK_PRESS_DESC(press03, slider/RB07_icon_Unlock_press_03.png);
+                       DRAGSLIDER_LOCK_PRESS_DESC(press04, slider/RB07_icon_Unlock_press_04.png);
+                       DRAGSLIDER_LOCK_PRESS_DESC(press05, slider/RB07_icon_Unlock_press_05.png);
+                       DRAGSLIDER_LOCK_PRESS_DESC(press06, slider/RB07_icon_Unlock_press_06.png);
+                       DRAGSLIDER_LOCK_PRESS_DESC(press07, slider/RB07_icon_Unlock_press_07.png);
+                       DRAGSLIDER_LOCK_PRESS_DESC(press08, slider/RB07_icon_Unlock_press_08.png);
+                       DRAGSLIDER_LOCK_PRESS_DESC(press09, slider/RB07_icon_Unlock_press_09.png);
+                       DRAGSLIDER_LOCK_PRESS_DESC(press10, slider/RB07_icon_Unlock_press_10.png);
+                       DRAGSLIDER_LOCK_PRESS_DESC(press11, slider/RB07_icon_Unlock_press_11.png);
+                       DRAGSLIDER_LOCK_PRESS_DESC(press12, slider/RB07_icon_Unlock_press_12.png);
+                       DRAGSLIDER_LOCK_PRESS_DESC(press13, slider/RB07_icon_Unlock_press_13.png);
+                       DRAGSLIDER_LOCK_PRESS_DESC(press14, slider/RB07_icon_Unlock_press_14.png);
+                       DRAGSLIDER_LOCK_PRESS_DESC(press15, slider/RB07_icon_Unlock_press_15.png);
+               }
+
+               part {
+                       name: "lock.wrapper.image.r";
+                       type: RECT;
+                       scale: 1;
+
+                       description {
+                               state: "default" 0.0;
+                               min: 122 114;
+                               align: 1.0 0.0;
+
+                               rel1 {
+                                       relative: 1.0 0.0;
+                                       to: "bg";
+                               }
+                               rel2 {
+                                       to: "bg";
+                               }
+                               color: 0 0 0 0;
+                       }
+               }
+
+               part {
+                       name: "arrow.padding.l";
+                       type: RECT;
+                       scale: 1;
+
+                       description {
+                               state: "default" 0.0;
+                               min: 126 0;
+                               align: 0.0 0.0;
+                               fixed: 1.0 1.0;
+
+                               rel1 {
+                                       to: "bg";
+                               }
+                               rel2 {
+                                       relative: 0.0 1.0;
+                                       to: "bg";
+                               }
+                               visible: 0;
+                       }
+               }
+
+               part {
+                       name: "arrow.padding.r";
+                       type: RECT;
+                       scale: 1;
+
+                       description {
+                               state: "default" 0.0;
+                               min: 126 0;
+                               align: 1.0 0.0;
+                               fixed: 1.0 1.0;
+
+                               rel1 {
+                                       relative: 1.0 0.0;
+                                       to: "bg";
+                               }
+                               rel2 {
+                                       to: "bg";
+                               }
+                               visible: 0;
+                       }
+               }
+
+               part {
+                       name: "rect.arrow";
+                       type: RECT;
+                       scale: 1;
+
+                       description {
+                               state: "default" 0.0;
+
+                               rel1 {
+                                       relative: 1.0 0.0;
+                                       to: "arrow.padding.l";
+                               }
+                               rel2 {
+                                       relative: 0.0 1.0;
+                                       to: "arrow.padding.r";
+                               }
+                               visible: 0;
+                       }
+               }
+
+               DRAGSLIDER_ARROW_RECT(arrow1, 0.0, 1/6);
+               DRAGSLIDER_ARROW_RECT(arrow2, 1/6, 2/6);
+               DRAGSLIDER_ARROW_RECT(arrow3, 2/6, 3/6);
+               DRAGSLIDER_ARROW_RECT(arrow4, 3/6, 4/6);
+               DRAGSLIDER_ARROW_RECT(arrow5, 4/6, 5/6);
+               DRAGSLIDER_ARROW_RECT(arrow6, 5/6, 6/6);
+
+               DRAGSLIDER_ARROW_IMAGE(image1, arrow1);
+               DRAGSLIDER_ARROW_IMAGE(image2, arrow2);
+               DRAGSLIDER_ARROW_IMAGE(image3, arrow3);
+               DRAGSLIDER_ARROW_IMAGE(image4, arrow4);
+               DRAGSLIDER_ARROW_IMAGE(image5, arrow5);
+               DRAGSLIDER_ARROW_IMAGE(image6, arrow6);
+       }
+
+       programs {
+               program{
+                       name: "press.lock.l";
+                       signal: "press";
+                       source: "lock.image.l";
+                       action: STATE_SET "press" 0.0;
+                       target: "lock.image.l";
+                       target: "arrow.image1";
+                       target: "arrow.image2";
+                       target: "arrow.image3";
+                       target: "arrow.image4";
+                       target: "arrow.image5";
+                       target: "arrow.image6";
+                       target: "image.bg";
+               }
+
+               program{
+                       name: "release.lock.l";
+                       signal: "release";
+                       source: "lock.image.l";
+                       action: STATE_SET "default" 0.0;
+                       target: "lock.image.l";
+                       target: "arrow.image1";
+                       target: "arrow.image2";
+                       target: "arrow.image3";
+                       target: "arrow.image4";
+                       target: "arrow.image5";
+                       target: "arrow.image6";
+                       target: "image.bg";
+               }
+
+               DRAGSLIDER_LOCK_PRESS_PROC(press02);
+               DRAGSLIDER_LOCK_PRESS_PROC(press03);
+               DRAGSLIDER_LOCK_PRESS_PROC(press04);
+               DRAGSLIDER_LOCK_PRESS_PROC(press05);
+               DRAGSLIDER_LOCK_PRESS_PROC(press06);
+               DRAGSLIDER_LOCK_PRESS_PROC(press07);
+               DRAGSLIDER_LOCK_PRESS_PROC(press08);
+               DRAGSLIDER_LOCK_PRESS_PROC(press09);
+               DRAGSLIDER_LOCK_PRESS_PROC(press10);
+               DRAGSLIDER_LOCK_PRESS_PROC(press11);
+               DRAGSLIDER_LOCK_PRESS_PROC(press12);
+               DRAGSLIDER_LOCK_PRESS_PROC(press13);
+               DRAGSLIDER_LOCK_PRESS_PROC(press14);
+               DRAGSLIDER_LOCK_PRESS_PROC(press15);
+
+               program{
+                       name: "release.lock.r";
+                       signal: "release";
+                       source: "lock.image.r";
+                       action: STATE_SET "default" 0.0;
+                       target: "lock.image.r";
+               }
+       }
+}
\ No newline at end of file
diff --git a/data/images/RB07_icon_back_01.png b/data/images/RB07_icon_back_01.png
new file mode 100755 (executable)
index 0000000..f224b04
Binary files /dev/null and b/data/images/RB07_icon_back_01.png differ
diff --git a/data/images/RB07_icon_back_dim.png b/data/images/RB07_icon_back_dim.png
new file mode 100755 (executable)
index 0000000..6a1be74
Binary files /dev/null and b/data/images/RB07_icon_back_dim.png differ
diff --git a/data/images/RB07_icon_back_normal.png b/data/images/RB07_icon_back_normal.png
new file mode 100755 (executable)
index 0000000..d573787
Binary files /dev/null and b/data/images/RB07_icon_back_normal.png differ
diff --git a/data/images/RB07_icon_back_press.png b/data/images/RB07_icon_back_press.png
new file mode 100755 (executable)
index 0000000..00d0f76
Binary files /dev/null and b/data/images/RB07_icon_back_press.png differ
diff --git a/data/images/RB07_icon_enter.png b/data/images/RB07_icon_enter.png
new file mode 100755 (executable)
index 0000000..0fb460e
Binary files /dev/null and b/data/images/RB07_icon_enter.png differ
diff --git a/data/images/RB07_icon_shift_focused.png b/data/images/RB07_icon_shift_focused.png
new file mode 100755 (executable)
index 0000000..4a18b36
Binary files /dev/null and b/data/images/RB07_icon_shift_focused.png differ
diff --git a/data/images/RB07_icon_shift_normal.png b/data/images/RB07_icon_shift_normal.png
new file mode 100755 (executable)
index 0000000..de568be
Binary files /dev/null and b/data/images/RB07_icon_shift_normal.png differ
diff --git a/data/images/RB07_icon_space.png b/data/images/RB07_icon_space.png
new file mode 100755 (executable)
index 0000000..a383215
Binary files /dev/null and b/data/images/RB07_icon_space.png differ
diff --git a/data/images/RB07_key_btn_01.png b/data/images/RB07_key_btn_01.png
new file mode 100755 (executable)
index 0000000..666a8c4
Binary files /dev/null and b/data/images/RB07_key_btn_01.png differ
diff --git a/data/images/RB07_key_btn_02.png b/data/images/RB07_key_btn_02.png
new file mode 100755 (executable)
index 0000000..9a38142
Binary files /dev/null and b/data/images/RB07_key_btn_02.png differ
diff --git a/data/images/RB07_key_btn_perss.png b/data/images/RB07_key_btn_perss.png
new file mode 100755 (executable)
index 0000000..62dcdba
Binary files /dev/null and b/data/images/RB07_key_btn_perss.png differ
diff --git a/data/images/RB07_key_btn_qwerty_01.png b/data/images/RB07_key_btn_qwerty_01.png
new file mode 100755 (executable)
index 0000000..67afa2b
Binary files /dev/null and b/data/images/RB07_key_btn_qwerty_01.png differ
diff --git a/data/images/RB07_key_btn_qwerty_02.png b/data/images/RB07_key_btn_qwerty_02.png
new file mode 100755 (executable)
index 0000000..669a2bd
Binary files /dev/null and b/data/images/RB07_key_btn_qwerty_02.png differ
diff --git a/data/images/RB07_keypad_bg.png b/data/images/RB07_keypad_bg.png
new file mode 100755 (executable)
index 0000000..547ec6a
Binary files /dev/null and b/data/images/RB07_keypad_bg.png differ
diff --git a/data/images/ls_button_default.png b/data/images/ls_button_default.png
new file mode 100755 (executable)
index 0000000..5273c7b
Binary files /dev/null and b/data/images/ls_button_default.png differ
diff --git a/data/images/ls_button_press.png b/data/images/ls_button_press.png
new file mode 100755 (executable)
index 0000000..e914596
Binary files /dev/null and b/data/images/ls_button_press.png differ
diff --git a/data/images/ls_button_sos_phone.png b/data/images/ls_button_sos_phone.png
new file mode 100755 (executable)
index 0000000..db1b0a5
Binary files /dev/null and b/data/images/ls_button_sos_phone.png differ
diff --git a/data/images/ls_button_x.png b/data/images/ls_button_x.png
new file mode 100755 (executable)
index 0000000..56a04a8
Binary files /dev/null and b/data/images/ls_button_x.png differ
diff --git a/data/images/ls_password_box_01.png b/data/images/ls_password_box_01.png
new file mode 100755 (executable)
index 0000000..2e48149
Binary files /dev/null and b/data/images/ls_password_box_01.png differ
diff --git a/data/images/ls_password_star_01.png b/data/images/ls_password_star_01.png
new file mode 100755 (executable)
index 0000000..088eb12
Binary files /dev/null and b/data/images/ls_password_star_01.png differ
diff --git a/data/images/slider/RB07_Unlock_bg.png b/data/images/slider/RB07_Unlock_bg.png
new file mode 100755 (executable)
index 0000000..0e0a6ea
Binary files /dev/null and b/data/images/slider/RB07_Unlock_bg.png differ
diff --git a/data/images/slider/RB07_Unlock_bg_press.png b/data/images/slider/RB07_Unlock_bg_press.png
new file mode 100755 (executable)
index 0000000..17caba0
Binary files /dev/null and b/data/images/slider/RB07_Unlock_bg_press.png differ
diff --git a/data/images/slider/RB07_icon_Unlock_01.png b/data/images/slider/RB07_icon_Unlock_01.png
new file mode 100755 (executable)
index 0000000..c868560
Binary files /dev/null and b/data/images/slider/RB07_icon_Unlock_01.png differ
diff --git a/data/images/slider/RB07_icon_Unlock_02.png b/data/images/slider/RB07_icon_Unlock_02.png
new file mode 100755 (executable)
index 0000000..01329e4
Binary files /dev/null and b/data/images/slider/RB07_icon_Unlock_02.png differ
diff --git a/data/images/slider/RB07_icon_Unlock_arrow.png b/data/images/slider/RB07_icon_Unlock_arrow.png
new file mode 100755 (executable)
index 0000000..7b5f9ab
Binary files /dev/null and b/data/images/slider/RB07_icon_Unlock_arrow.png differ
diff --git a/data/images/slider/RB07_icon_Unlock_arrow_press.png b/data/images/slider/RB07_icon_Unlock_arrow_press.png
new file mode 100755 (executable)
index 0000000..972cedc
Binary files /dev/null and b/data/images/slider/RB07_icon_Unlock_arrow_press.png differ
diff --git a/data/images/slider/RB07_icon_Unlock_press_01.png b/data/images/slider/RB07_icon_Unlock_press_01.png
new file mode 100755 (executable)
index 0000000..61bd43b
Binary files /dev/null and b/data/images/slider/RB07_icon_Unlock_press_01.png differ
diff --git a/data/images/slider/RB07_icon_Unlock_press_02.png b/data/images/slider/RB07_icon_Unlock_press_02.png
new file mode 100755 (executable)
index 0000000..68a1c3c
Binary files /dev/null and b/data/images/slider/RB07_icon_Unlock_press_02.png differ
diff --git a/data/images/slider/RB07_icon_Unlock_press_03.png b/data/images/slider/RB07_icon_Unlock_press_03.png
new file mode 100755 (executable)
index 0000000..41787ca
Binary files /dev/null and b/data/images/slider/RB07_icon_Unlock_press_03.png differ
diff --git a/data/images/slider/RB07_icon_Unlock_press_04.png b/data/images/slider/RB07_icon_Unlock_press_04.png
new file mode 100755 (executable)
index 0000000..35f459f
Binary files /dev/null and b/data/images/slider/RB07_icon_Unlock_press_04.png differ
diff --git a/data/images/slider/RB07_icon_Unlock_press_05.png b/data/images/slider/RB07_icon_Unlock_press_05.png
new file mode 100755 (executable)
index 0000000..cae5dd3
Binary files /dev/null and b/data/images/slider/RB07_icon_Unlock_press_05.png differ
diff --git a/data/images/slider/RB07_icon_Unlock_press_06.png b/data/images/slider/RB07_icon_Unlock_press_06.png
new file mode 100755 (executable)
index 0000000..9a8370f
Binary files /dev/null and b/data/images/slider/RB07_icon_Unlock_press_06.png differ
diff --git a/data/images/slider/RB07_icon_Unlock_press_07.png b/data/images/slider/RB07_icon_Unlock_press_07.png
new file mode 100755 (executable)
index 0000000..2ee6dfe
Binary files /dev/null and b/data/images/slider/RB07_icon_Unlock_press_07.png differ
diff --git a/data/images/slider/RB07_icon_Unlock_press_08.png b/data/images/slider/RB07_icon_Unlock_press_08.png
new file mode 100755 (executable)
index 0000000..b39f220
Binary files /dev/null and b/data/images/slider/RB07_icon_Unlock_press_08.png differ
diff --git a/data/images/slider/RB07_icon_Unlock_press_09.png b/data/images/slider/RB07_icon_Unlock_press_09.png
new file mode 100755 (executable)
index 0000000..7f00111
Binary files /dev/null and b/data/images/slider/RB07_icon_Unlock_press_09.png differ
diff --git a/data/images/slider/RB07_icon_Unlock_press_10.png b/data/images/slider/RB07_icon_Unlock_press_10.png
new file mode 100755 (executable)
index 0000000..3b1f99f
Binary files /dev/null and b/data/images/slider/RB07_icon_Unlock_press_10.png differ
diff --git a/data/images/slider/RB07_icon_Unlock_press_11.png b/data/images/slider/RB07_icon_Unlock_press_11.png
new file mode 100755 (executable)
index 0000000..4342186
Binary files /dev/null and b/data/images/slider/RB07_icon_Unlock_press_11.png differ
diff --git a/data/images/slider/RB07_icon_Unlock_press_12.png b/data/images/slider/RB07_icon_Unlock_press_12.png
new file mode 100755 (executable)
index 0000000..48b4501
Binary files /dev/null and b/data/images/slider/RB07_icon_Unlock_press_12.png differ
diff --git a/data/images/slider/RB07_icon_Unlock_press_13.png b/data/images/slider/RB07_icon_Unlock_press_13.png
new file mode 100755 (executable)
index 0000000..521bf03
Binary files /dev/null and b/data/images/slider/RB07_icon_Unlock_press_13.png differ
diff --git a/data/images/slider/RB07_icon_Unlock_press_14.png b/data/images/slider/RB07_icon_Unlock_press_14.png
new file mode 100755 (executable)
index 0000000..2b41e5a
Binary files /dev/null and b/data/images/slider/RB07_icon_Unlock_press_14.png differ
diff --git a/data/images/slider/RB07_icon_Unlock_press_15.png b/data/images/slider/RB07_icon_Unlock_press_15.png
new file mode 100755 (executable)
index 0000000..57dec32
Binary files /dev/null and b/data/images/slider/RB07_icon_Unlock_press_15.png differ
diff --git a/data/lockscreen-entry.edc b/data/lockscreen-entry.edc
new file mode 100755 (executable)
index 0000000..4115a70
--- /dev/null
@@ -0,0 +1,474 @@
+/*
+ * 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/entry/base-single/default";
+               data.item: "default_font_size" "24";
+               data.item: "min_font_size" "8";
+               data.item: "max_font_size" "60";
+               styles {
+                       style {
+                               name: "entry_single_textblock_style";
+                               base: "font=SLP:style=Light text_class=slp font_size=88 color=#F9F9F9FF wrap=none";
+                               tag:  "br" "\n";
+                               tag:  "ps" "ps";
+                               tag:  "tab" "\t";
+                               tag:  "em" "+ font=SLP:style=Oblique";
+                               tag:  "b" "+ font=SLP:style=Bold";
+                               tag:  "link" "+ color=#800 underline=on underline_color=#8008";
+                               tag:  "hilight" "+ font=SLP:style=Bold";
+                               tag:  "preedit" "+ underline=on underline_color=#000000FF";
+                               tag:  "preedit_sel" "+ backing=on backing_color=#000000FF color=#FFFFFFFF";
+                       }
+                       style {
+                               name: "entry_single_textblock_disabled_style";
+                               base: "font=SLP:style=Light text_class=slp font_size=88 color=#00000080 wrap=none";
+                               tag:  "br" "\n";
+                               tag:  "ps" "ps";
+                               tag:  "tab" "\t";
+                               tag:  "em" "+ font=SLP:style=Oblique";
+                               tag:  "b" "+ font=SLP:style=Bold";
+                               tag:  "link" "+ color=#00000080 underline=on underline_color=#00000080";
+                               tag:  "hilight" "+ font=SLP:style=Bold";
+                               tag:  "preedit" "+ underline=on underline_color=#000000FF";
+                               tag:  "preedit_sel" "+ backing=on backing_color=#000000FF color=#FFFFFFFF";
+                       }
+               }
+               data {
+                       item: context_menu_orientation "horizontal";
+               }
+               parts {
+                       part {
+                               name: "entry.swallow.background";
+                               type: SWALLOW;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       rel1 { relative: 0 0; to: "elm.text"; }
+                                       rel2 { relative: 1 1; to: "elm.text"; }
+                               }
+                       }
+               }
+               parts {
+                       part {
+                               name: "elm.text";
+                               type: TEXTBLOCK;
+                               mouse_events: 1;
+                               scale: 1;
+                               entry_mode: EDITABLE;
+                               select_mode: BLOCK_HANDLE;
+                               multiline: 0;
+                               source: "elm/entry/selection/default";
+                               source2: "elm/entry/selection/block_handle";
+                               source3: "elm/entry/selection/block_handle_top";
+                               source4: "elm/entry/cursor/default";
+                               source5: "elm/entry/anchor/default";
+                               description {
+                                       state: "default" 0.0;
+                                       text {
+                                               style: "entry_single_textblock_style";
+                                               min: 1 1;
+                                               max: 0 1;
+                                       }
+                               }
+                               description {
+                                       state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       text {
+                                               style: "entry_single_textblock_disabled_style";
+                                       }
+                               }
+                       }
+               }
+               programs {
+                       program {
+                               name: "focus";
+                               signal: "load";
+                               source: "";
+                               action: FOCUS_SET;
+                               target: "elm.text";
+                       }
+                       program {
+                               name: "disable";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "elm.text";
+                       }
+                       program {
+                               name: "enable";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "elm.text";
+                       }
+               }
+       }
+       group {
+               name: "elm/entry/base-password/lockscreen_complex_password_style";
+               data.item: "default_font_size" "24";
+               data.item: "min_font_size" "8";
+               data.item: "max_font_size" "60";
+               data {
+                       item: context_menu_orientation "horizontal";
+               }
+               parts {
+                       part {
+                               name: "entry.swallow.background";
+                               type: SWALLOW;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       rel1 { relative: 0 0; to: "elm.text"; }
+                                       rel2 { relative: 1 1; to: "elm.text"; }
+                               }
+                       }
+               }
+               parts {
+                       part {
+                               name: "elm.text";
+                               type: TEXTBLOCK;
+                               mouse_events: 1;
+                               scale: 1;
+                               entry_mode: PASSWORD;
+                               select_mode: BLOCK_HANDLE;
+                               multiline: 0;
+                               source: "elm/entry/selection/default";
+                               source2: "elm/entry/selection/block_handle";
+                               source3: "elm/entry/selection/block_handle_top";
+                               source4: "elm/entry/cursor/default";
+                               source5: "elm/entry/anchor/default";
+                               description {
+                                       state: "default" 0.0;
+                                       text {
+                                               style: "entry_single_textblock_style";
+                                               repch: "*";
+                                               min: 1 1;
+                                               max: 0 0;
+                                               align: 0.0 0.5;
+                                       }
+                               }
+                               description {
+                                       state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       text {
+                                               style: "entry_single_textblock_disabled_style";
+                                       }
+                               }
+                       }
+               }
+               programs {
+                       program {
+                               name: "focus";
+                               signal: "load";
+                               source: "";
+                               action: FOCUS_SET;
+                               target: "elm.text";
+                       }
+                       program {
+                               name: "disable";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "elm.text";
+                       }
+                       program {
+                               name: "enable";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "elm.text";
+                       }
+               }
+       }
+       group {
+               name: "elm/entry/cursor/default";
+               parts {
+                       part {
+                               name: "clip2";
+                               type: RECT;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1.to: "clip";
+                                       rel2.to: "clip";
+                                       visible: 0;
+                               }
+                               description {
+                                       state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+                       part {
+                               name: "clip";
+                               type: RECT;
+                               mouse_events: 0;
+                               scale: 1;
+                               clip_to: "clip2";
+                               description {
+                                       state: "default" 0.0;
+                                       rel1.offset: -10 0;
+                                       rel2.offset: 9 9;
+                               }
+                               description {
+                                       state: "hidden" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+                       part {
+                               name: "base";
+                               mouse_events: 0;
+                               scale: 1;
+                               clip_to: "clip";
+                               description {
+                                       state: "default" 0.0;
+                                       min: 2 2;
+                                       align: 0.5 1.0;
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part {
+                               name: "glow";
+                               type: RECT;
+                               mouse_events: 0;
+                               scale: 1;
+                               clip_to: "clip2";
+                               description {
+                                       state: "default" 0.0;
+                                       min: 4 0;
+                                       fixed: 1 0;
+                                       align: 0.5 0.5;
+                                       rel1 {
+                                               relative: 0.0  0.0;
+                                               offset: 0 2;
+                                       }
+                                       rel2 {
+                                               relative: 0.0  1.0;
+                                               offset: 0 -2;
+                                       }
+                                       color: 42 137 194 255;
+                               }
+                               description {
+                                       state: "hidden" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                       }
+               }
+               programs {
+                       program {
+                               name: "show";
+                               action: STATE_SET "hidden" 0.0;
+                               in: 0.6 0.0;
+                               target: "glow";
+                               after: "show4";
+                       }
+                       program {
+                               name: "show4";
+                               action: STATE_SET "default" 0.0;
+                               in: 0.6 0.0;
+                               target: "glow";
+                               after: "show";
+                       }
+                       program {
+                               name: "focused";
+                               signal: "elm,action,focus";
+                               source: "elm";
+                               action: STATE_SET "focused" 0.0;
+                               target: "clip2";
+                               after: "show4";
+                       }
+                       program {
+                               name: "unfocused";
+                               signal: "elm,action,unfocus";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "clip2";
+                               after: "stop_glow";
+                       }
+                       program {
+                               name: "stop_glow";
+                               action: ACTION_STOP;
+                               target: "show";
+                               target: "show4";
+                       }
+               }
+       }
+       group { name: "elm/entry/selection/default";
+               parts {
+                       part {
+                               name: "bg";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       color: 138 183 223 128;
+                               }
+                       }
+               }
+       }
+       group {
+               name: "elm/entry/selection/block_handle";
+               data.item: "position" "BOTH";
+               parts {
+                       part {
+                               name: "bg";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       fixed: 1 1;
+                                       align: 0.5 0.25;
+                                       min: 50 80;
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part {
+                               name: "handle";
+                               mouse_events: 1;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       fixed: 1 1;
+                                       align: 0.5 0.0;
+                                       min: 48 66;
+                                       rel1 {
+                                               relative: 0.0 0.0;
+                                               offset: 0 0;
+                                       }
+                                       rel2 {
+                                               relative: 0.0 0.0;
+                                               offset: 0 0;
+                                       }
+                                       image {
+                                               border: 0 0 0 0;
+                                       }
+                                       image.middle: SOLID;
+                                       fill.smooth: 0;
+                               }
+                               description {
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program {
+                               name: "focused";
+                               signal: "elm,action,focus";
+                               source: "elm";
+                               action: STATE_SET "show" 0.0;
+                               target: "handle";
+                       }
+                       program {
+                               name: "unfocused";
+                               signal: "elm,action,unfocus";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "handle";
+                       }
+               }
+       }
+       group {
+               name: "elm/entry/selection/block_handle_top";
+               data.item: "position" "BOTH";
+               parts {
+                       part {
+                               name: "bg";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 1;
+                                       fixed: 1 1;
+                                       align: 0.5 0.75;
+                                       min: 50 80;
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part {
+                               name: "handle";
+                               mouse_events: 1;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       fixed: 1 1;
+                                       align: 0.5 1.0;
+                                       min: 48 66;
+                                       rel1 {
+                                               relative: 0.0 0.0;
+                                               offset: 0 0;
+                                       }
+                                       rel2 {
+                                               relative: 0.0 0.0;
+                                               offset: 0 0;
+                                       }
+                                       image {
+                                               border: 0 0 0 0;
+                                       }
+                                       image.middle: SOLID;
+                                       fill.smooth: 0;
+                               }
+                               description {
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program {
+                               name: "focused";
+                               signal: "elm,action,focus";
+                               source: "elm";
+                               action: STATE_SET "show" 0.0;
+                               target: "handle";
+                       }
+                       program {
+                               name: "unfocused";
+                               signal: "elm,action,unfocus";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "handle";
+                       }
+               }
+       }
+       group {
+               name: "elm/entry/anchor/default";
+               parts {
+                       part {
+                               name: "bg";
+                               type: RECT;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       color: 128 0 0 64;
+                               }
+                       }
+               }
+       }
+}
diff --git a/data/lockscreen.edc b/data/lockscreen.edc
new file mode 100755 (executable)
index 0000000..f06974c
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+collections {
+       #include "groups/lock-main.edc"
+       #include "groups/lock-info.edc"
+       #include "groups/lock-noti.edc"
+       #include "groups/lock-simple-password.edc"
+       #include "groups/lock-complex-password.edc"
+       #include "groups/lock-slider.edc"
+}
diff --git a/debian/changelog b/debian/changelog
new file mode 100755 (executable)
index 0000000..96f1479
--- /dev/null
@@ -0,0 +1,7 @@
+lock-screen (0.0.1) unstable; urgency=low
+
+  * released first
+  * Git: 165.213.180.234:/magnolia/apps/home/lockscreen
+  * Tag: lock-screen_0.1.1
+
+ -- geunsun lee <gs86.lee@samsung.com>  Mon, 07 Mar 2012 13:51:11 +0900
diff --git a/debian/compat b/debian/compat
new file mode 100755 (executable)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100755 (executable)
index 0000000..f4ed7c5
--- /dev/null
@@ -0,0 +1,17 @@
+Source: lockscreen
+Section: devel
+Priority: extra
+Maintainer: Geun Sun, Lee <gs86.lee@samsung.com>
+Build-Depends: debhelper (>= 5), libelm-dev, libslp-setting-dev, libheynoti-dev, libappcore-efl-dev, libslp-utilx-dev, libsvi-dev, libaul-1-dev, libbundle-dev, libslp-pm-dev, libui-gadget-dev, libcontacts-service-dev, libsoup2.4-dev, libxml2-dev, libecore-dev, libevas-dev, libedje-dev, dlog-dev, libicu-dev, libnotification-dev, libssl-dev,security-server, livebox-viewer, shortcut
+Standards-Version: 3.7.2
+
+Package: org.tizen.lockscreen
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libicu
+Description: lockscreen
+
+Package: org.tizen.lockscreen-dbg
+Section: debug
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, org.tizen.lockscreen (= ${Source-Version})
+Description: lockscreen (unstripped)
diff --git a/debian/org.tizen.lockscreen.install.in b/debian/org.tizen.lockscreen.install.in
new file mode 100755 (executable)
index 0000000..b3c3f34
--- /dev/null
@@ -0,0 +1,5 @@
+@PREFIX@/bin/*
+@PREFIX@/res/*
+@PREFIX@/data
+/opt/share/applications/*
+/opt/ug/*
diff --git a/debian/org.tizen.lockscreen.postinst b/debian/org.tizen.lockscreen.postinst
new file mode 100755 (executable)
index 0000000..88d7a39
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+if [ x"${USER}" == x"root" ]
+then
+       #5000 is inhouse user id
+       #do not use relative path
+       chown -R 5000:5000 /opt/apps/org.tizen.lockscreen/data
+fi
+
+GOPTION=""  # Set without -g, -u options
+if [ ${USER} == "root" ]
+then
+       # Set vconf values with -g/-u options
+       GOPTION="-g 6514"
+fi
+
+vconftool $GOPTION set -t string file/private/org.tizen.lockscreen/title "Welcome"
+vconftool $GOPTION set -t string file/private/org.tizen.lockscreen/title2 " "
+vconftool $GOPTION set -t int file/private/org.tizen.lockscreen/title_line "1"
+vconftool $GOPTION set -t int db/org.tizen.lockscreen/info_position "2"
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..4254cb5
--- /dev/null
@@ -0,0 +1,114 @@
+#!/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
+LDFLAGS ?=
+PREFIX ?= /opt/apps/org.tizen.lockscreen
+RESDIR ?= /opt/apps/org.tizen.lockscreen/res
+DATADIR ?= /opt/apps/org.tizen.lockscreen/data
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -O0
+else
+       CFLAGS += -O2
+endif
+
+LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed
+
+CMAKE_BUILD_DIR ?= $(CURDIR)/cmake_build_tmp
+
+configure: configure-stamp
+configure-stamp:
+       dh_testdir
+       # Add here commands to configure the package.
+       mkdir -p $(CMAKE_BUILD_DIR) && cd $(CMAKE_BUILD_DIR) && \
+       CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" cmake .. -DCMAKE_INSTALL_PREFIX="$(PREFIX)"
+
+       touch configure-stamp
+
+build: build-stamp
+
+build-stamp: configure-stamp
+       dh_testdir
+
+       # Add here commands to compile the package.
+       cd $(CMAKE_BUILD_DIR) && $(MAKE)
+
+       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#@RESDIR@#$(RESDIR)#g" $${f%.in}; \
+               sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
+       done
+
+       touch $@
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp configure-stamp
+
+       # Add here commands to clean up after the build process.
+       rm -rf $(CMAKE_BUILD_DIR)
+
+       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.
+       cd $(CMAKE_BUILD_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+       dh_testdir
+       dh_testroot
+#      dh_installchangelogs
+#      dh_installdocs
+#      dh_installexamples
+       dh_install --sourcedir=debian/tmp
+#      dh_installmenu
+#      dh_installdebconf
+#      dh_installlogrotate
+#      dh_installemacsen
+#      dh_installpam
+#      dh_installmime
+#      dh_python
+#      dh_installinit
+#      dh_installcron
+#      dh_installinfo
+       dh_installman
+       dh_link
+       dh_strip --dbg-package=org.tizen.lockscreen-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/org.tizen.lockscreen.manifest b/org.tizen.lockscreen.manifest
new file mode 100755 (executable)
index 0000000..51303c7
--- /dev/null
@@ -0,0 +1,8 @@
+<manifest>
+       <define>
+               <domain name="org.tizen.lockscreen" />
+       </define>
+       <request>
+               <domain name="org.tizen.lockscreen" />
+       </request>
+</manifest>
diff --git a/org.tizen.lockscreen.xml.in b/org.tizen.lockscreen.xml.in
new file mode 100755 (executable)
index 0000000..92d7119
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<manifest xmlns="http://tizen.org/ns/packages" package="@PKGNAME@" version="0.1.1" install-location="internal-only">\r
+       <label>@PROJECT_NAME@</label>\r
+       <author email="yjoo93.park@samsung.com" href="www.samsung.com">Youngjoo Park</author>\r
+       <author email="seungtaek.chung@samsung.com" href="www.samsung.com">seungtaek chung</author>\r
+       <description>@PROJECT_NAME@</description>\r
+       <ui-application appid="@PKGNAME@" exec="@BINDIR@/@PROJECT_NAME@" nodisplay="true" multiple="false" type="capp" taskmanage="false" categories="lock-screen">\r
+               <label>@PROJECT_NAME@</label>\r
+       </ui-application>\r
+</manifest>\r
diff --git a/packaging/org.tizen.lockscreen.spec b/packaging/org.tizen.lockscreen.spec
new file mode 100755 (executable)
index 0000000..37d96d9
--- /dev/null
@@ -0,0 +1,52 @@
+%define PREFIX /usr/apps/org.tizen.lockscreen
+
+Name:       org.tizen.lockscreen
+Summary:    lockscreen application
+Version: 0.1.1
+Release:    1
+Group:      TBD
+License:    Apache
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(ecore-x)
+BuildRequires: pkgconfig(appcore-efl)
+BuildRequires: pkgconfig(utilX)
+BuildRequires: pkgconfig(ail)
+BuildRequires: pkgconfig(notification)
+BuildRequires: pkgconfig(security-server)
+BuildRequires: pkgconfig(mdm)
+
+BuildRequires: cmake
+BuildRequires: gettext
+BuildRequires: edje-tools
+%description
+lockscreen application.
+
+%prep
+%setup -q
+
+%build
+LDFLAGS+="-Wl,--rpath=%{PREFIX}/lib -Wl,--as-needed";export LDFLAGS
+cmake . -DCMAKE_INSTALL_PREFIX=%{PREFIX}
+make %{?jobs:-j%jobs}
+
+%install
+%make_install
+mkdir -p %{buildroot}/usr/apps/org.tizen.lockscreen/data
+mkdir -p %{buildroot}/usr/share/license
+install -m 0755 LICENSE %{buildroot}/usr/share/license/org.tizen.lockscreen
+
+%post
+/sbin/ldconfig
+
+GOPTION="-g 6514"
+
+%postun -p /sbin/ldconfig
+
+%files
+%manifest org.tizen.lockscreen.manifest
+%defattr(-,root,root,-)
+%attr(-,inhouse,inhouse) %dir /usr/apps/org.tizen.lockscreen/data
+/usr/apps/org.tizen.lockscreen/*
+/usr/share/packages/org.tizen.lockscreen.xml
+/usr/share/license/org.tizen.lockscreen
diff --git a/src/bg.c b/src/bg.c
new file mode 100755 (executable)
index 0000000..6fcc744
--- /dev/null
+++ b/src/bg.c
@@ -0,0 +1,260 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <dlog.h>
+#include <vconf.h>
+#include <vconf-keys.h>
+
+#include "lockscreen.h"
+#include "util.h"
+#include "simple-password.h"
+#include "complex-password.h"
+
+static double _get_move(Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2)
+{
+       return ((x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1));
+}
+
+static void _flick_event_process(struct appdata *ad)
+{
+       int status = 0;
+       int locktype = 0;
+
+       vconf_get_int(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT, &locktype);
+       if(locktype == SETTING_SCREEN_LOCK_TYPE_SIMPLE_PASSWORD){
+               simple_password_layout_create(ad);
+       } else if(locktype == SETTING_SCREEN_LOCK_TYPE_PASSWORD){
+               complex_password_layout_create(ad);
+       }
+}
+
+void _mouse_down_cb_s(void *data, Evas * evas, Evas_Object * obj, void *event_info)
+{
+       LOGD("[ == %s == ]", __func__);
+       struct appdata *ad = data;
+       if (ad == NULL)
+               return;
+
+       evas_pointer_output_xy_get(evas_object_evas_get(obj), &ad->posx[POS_DOWN], &ad->posy[POS_DOWN]);
+       if(ad->posy[POS_DOWN] < FLICK_LINE) {
+               return;
+       }else {
+               ad->bFlick = 1;
+               ad->posx[POS_REC] = ad->posx[POS_DOWN];
+               ad->posy[POS_REC] = ad->posy[POS_DOWN];
+       }
+}
+
+void _mouse_move_cb_s(void *data, Evas * evas, Evas_Object * obj, void *event_info)
+{
+       struct appdata *ad = data;
+       if (ad == NULL)
+               return;
+
+       if(ad->bFlick == 1) {
+               evas_pointer_output_xy_get(evas_object_evas_get(obj), &ad->posx[POS_MOVE], &ad->posy[POS_MOVE]);
+               if(ad->posy[POS_MOVE] < ad->posy[POS_REC]) {
+                       double d = _get_move(ad->posx[POS_DOWN], ad->posy[POS_DOWN], ad->posx[POS_MOVE], ad->posy[POS_MOVE]);
+                       if(d > (_X(84100)*1.3)) {
+                               ad->bFlick = 0;
+                               LOCK_SCREEN_TRACE_DBG("====move info up====");
+                               _flick_event_process(ad);
+                       }
+                       ad->posx[POS_REC] = ad->posx[POS_MOVE];
+                       ad->posy[POS_REC] = ad->posy[POS_MOVE];
+               }
+       }
+}
+
+void _mouse_up_cb_s(void *data, Evas * evas, Evas_Object * obj, void *event_info)
+{
+       struct appdata *ad = data;
+       if (ad == NULL)
+               return;
+
+       if(ad->bFlick == 1) {
+               ad->bFlick = 0;
+               evas_pointer_output_xy_get(evas_object_evas_get(obj), &ad->posx[POS_UP], &ad->posy[POS_UP]);
+               if(ad->posy[POS_UP] < ad->posy[POS_REC]) {
+                       double d = _get_move(ad->posx[POS_DOWN], ad->posy[POS_DOWN], ad->posx[POS_UP], ad->posy[POS_UP]);
+                       if(d > (_X(84100)*1.3)) {
+                               LOCK_SCREEN_TRACE_DBG("====move info up====");
+                               _flick_event_process(ad);
+                       }
+               }
+       }
+}
+
+void _slider_down_cb(void *data, Evas * evas, Evas_Object * obj, void *event_info)
+{
+       Evas_Event_Mouse_Down *ev = event_info;
+       struct appdata *ad = (struct appdata *) data;
+
+       if (ad == NULL) {
+               LOCK_SCREEN_TRACE_DBG("appdata is NULL");
+               return;
+       }
+
+       if (ev == NULL) {
+               LOCK_SCREEN_TRACE_DBG("event_info is NULL");
+               return;
+       }
+
+       if (ad->slider_rel1.x <= ev->canvas.x && ad->slider_rel1.y <= ev->canvas.y
+                       && (ad->slider_rel1.x + ad->slider_rel1.w) >= ev->canvas.x
+                       && (ad->slider_rel1.y + ad->slider_rel1.h) >= ev->canvas.y) {
+               ad->bDrag= 1;
+
+               edje_object_signal_emit(_EDJ(ad->slider), "press",
+                               "lock.image.l");
+               edje_object_signal_emit(_EDJ(ad->slider), "press02",
+                               "lock.image.r");
+       } else {
+               LOCK_SCREEN_TRACE_DBG("sliding is canceled");
+               ad->bDrag= 0;
+       }
+}
+
+void _slider_move_cb(void *data, Evas * evas, Evas_Object * obj, void *event_info)
+{
+       Evas_Event_Mouse_Move *ev = event_info;
+       struct appdata *ad = (struct appdata *) data;
+       int step_width = 0;
+       int step_number = 0;
+       int alpha = 0;
+
+       if (ad == NULL) {
+               LOCK_SCREEN_TRACE_DBG("appdata is NULL");
+               return;
+       }
+
+       if (ev == NULL) {
+               LOCK_SCREEN_TRACE_DBG("event_info is NULL");
+               return;
+       }
+
+       if (ad->bDrag == 0)
+       {
+               return;
+       }
+
+       if (ad->slider_rel1.x <= ev->cur.canvas.x
+                       && ad->slider_rel1.y <= ev->cur.canvas.y
+                       && (ad->slider_rel2.x + ad->slider_rel2.w) >= ev->cur.canvas.x
+                       && (ad->slider_rel2.y + ad->slider_rel2.h) >= ev->cur.canvas.y) {
+               ad->bDrag = 1;
+
+               step_width = (ad->slider_rel2.x + ad->slider_rel2.w - ad->slider_rel1.x)
+                               / 14;
+               step_number = (ev->cur.canvas.x - ad->slider_rel1.x) / step_width;
+
+               alpha = 255 - (2.55 * step_number * 3);
+
+               if (step_number < 1) {
+                       edje_object_signal_emit(_EDJ(ad->slider), "press02",
+                                       "lock.image.r");
+               } else if (step_number < 2) {
+                       edje_object_signal_emit(_EDJ(ad->slider), "press03",
+                                       "lock.image.r");
+               } else if (step_number < 3) {
+                       edje_object_signal_emit(_EDJ(ad->slider), "press04",
+                                       "lock.image.r");
+               } else if (step_number < 4) {
+                       edje_object_signal_emit(_EDJ(ad->slider), "press05",
+                                       "lock.image.r");
+               } else if (step_number < 5) {
+                       edje_object_signal_emit(_EDJ(ad->slider), "press06",
+                                       "lock.image.r");
+               } else if (step_number < 6) {
+                       edje_object_signal_emit(_EDJ(ad->slider), "press07",
+                                       "lock.image.r");
+               } else if (step_number < 7) {
+                       edje_object_signal_emit(_EDJ(ad->slider), "press08",
+                                       "lock.image.r");
+               } else if (step_number < 8) {
+                       edje_object_signal_emit(_EDJ(ad->slider), "press09",
+                                       "lock.image.r");
+               } else if (step_number < 9) {
+                       edje_object_signal_emit(_EDJ(ad->slider), "press10",
+                                       "lock.image.r");
+               } else if (step_number < 10) {
+                       edje_object_signal_emit(_EDJ(ad->slider), "press11",
+                                       "lock.image.r");
+               } else if (step_number < 11) {
+                       edje_object_signal_emit(_EDJ(ad->slider), "press12",
+                                       "lock.image.r");
+               } else if (step_number < 12) {
+                       edje_object_signal_emit(_EDJ(ad->slider), "press13",
+                                       "lock.image.r");
+               } else if (step_number < 13) {
+                       edje_object_signal_emit(_EDJ(ad->slider), "press14",
+                                       "lock.image.r");
+               } else {
+                       edje_object_signal_emit(_EDJ(ad->slider), "press15",
+                                       "lock.image.r");
+               }
+               evas_object_color_set(ad->ly_main, alpha, alpha, alpha, alpha);
+       } else {
+               LOCK_SCREEN_TRACE_DBG("sliding is canceled");
+               ad->bDrag = 0;
+
+               evas_object_color_set(ad->ly_main, 255, 255, 255, 255);
+
+               edje_object_signal_emit(_EDJ(ad->slider), "release",
+                               "lock.image.l");
+               edje_object_signal_emit(_EDJ(ad->slider), "release",
+                               "lock.image.r");
+       }
+
+}
+
+void _slider_up_cb(void *data, Evas * evas, Evas_Object * obj, void *event_info)
+{
+       Evas_Event_Mouse_Up *ev = event_info;
+       struct appdata *ad = (struct appdata *) data;
+
+       if (ad == NULL) {
+               LOCK_SCREEN_TRACE_DBG("appdata is NULL");
+               return;
+       }
+
+       if (ev == NULL) {
+               LOCK_SCREEN_TRACE_DBG("event_info is NULL");
+               return;
+       }
+
+       if (ad->bDrag == 1 && ad->slider_rel2.x <= ev->canvas.x
+                       && ad->slider_rel2.y <= ev->canvas.y
+                       && (ad->slider_rel2.x + ad->slider_rel2.w) >= ev->canvas.x
+                       && (ad->slider_rel2.y + ad->slider_rel2.h) >= ev->canvas.y) {
+               ad->bDrag = 1;
+       } else {
+               LOCK_SCREEN_TRACE_DBG("sliding is canceled");
+               ad->bDrag= 0;
+       }
+
+       edje_object_signal_emit(_EDJ(ad->slider), "release", "lock.image.l");
+       edje_object_signal_emit(_EDJ(ad->slider), "release", "lock.image.r");
+
+       if (ad->bDrag == 1) {
+               LOCK_SCREEN_TRACE_DBG("unlock the lock-screen");
+               app_efl_exit();
+       }
+
+       evas_object_color_set(ad->ly_main, 255, 255, 255, 255);
+
+       ad->bDrag = 0;
+}
diff --git a/src/bg.h b/src/bg.h
new file mode 100755 (executable)
index 0000000..67f7a1c
--- /dev/null
+++ b/src/bg.h
@@ -0,0 +1,29 @@
+/*
+ * 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 __BG_H__
+#define __BG_H__
+
+#include <Elementary.h>
+
+void _mouse_down_cb_s(void *data, Evas * evas, Evas_Object * obj, void *event_info);
+void _mouse_move_cb_s(void *data, Evas * evas, Evas_Object * obj, void *event_info);
+void _mouse_up_cb_s(void *data, Evas * evas, Evas_Object * obj, void *event_info);
+void _slider_down_cb(void *data, Evas * evas, Evas_Object * obj, void *event_info);
+void _slider_move_cb(void *data, Evas * evas, Evas_Object * obj, void *event_info);
+void _slider_up_cb(void *data, Evas * evas, Evas_Object * obj, void *event_info);
+
+#endif
diff --git a/src/complex-password.c b/src/complex-password.c
new file mode 100755 (executable)
index 0000000..4fe981b
--- /dev/null
@@ -0,0 +1,325 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the License);\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *  http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an AS IS BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <vconf.h>\r
+\r
+#include "lockscreen.h"\r
+#include "util.h"\r
+#include "log.h"\r
+#include "complex-password.h"\r
+#include "password-verification.h"\r
+\r
+#define MIN_PASSWORD_NUM 4\r
+#define MAX_PASSWORD_NUM 16\r
+#define PASSWORD_ATTEMPTS_MAX_NUM  5\r
+#define VCONFKEY_SETAPPL_PASSWORD_ATTEMPTS_LEFT_INT   VCONFKEY_SETAPPL_PREFIX"/phone_lock_attempts_left"\r
+#define VCONFKEY_SETAPPL_PASSWORD_TIMESTAMP_STR       VCONFKEY_SETAPPL_PREFIX"/phone_lock_timestamp"\r
+#define PASSWORD_TIMESTAMP_STR_LENGTH 512\r
+#define PASSWORD_BLOCK_SECONDS        30\r
+#define EDJ_LOCKSCREEN_ENTRY EDJDIR"/lockscreen-entry.edj"\r
+\r
+static Evas_Coord complex_pw_down_y = 0;\r
+\r
+static void __complex_password_keypad_process(void *data, Evas_Object *obj, const char *emission, const char *source)\r
+{\r
+       struct appdata *ad = data;\r
+       if(ad == NULL)\r
+               return;\r
+\r
+       LOCK_SCREEN_TRACE_DBG("source = %s", source);\r
+\r
+       if (strcasecmp("function1", source) == 0 || strcasecmp("function2", source) == 0) {\r
+               return ;\r
+       }\r
+\r
+       if (strcasecmp("space", source) == 0) {\r
+               if(ad->is_disabled) {\r
+                       return;\r
+               }\r
+               elm_entry_entry_insert(ad->c_password_entry, " ");\r
+       } else if (strcasecmp("bs", source) == 0) {\r
+               elm_entry_entry_insert(ad->c_password_entry, "");\r
+               const char *input_entry_str = NULL;\r
+               input_entry_str = elm_entry_entry_get(ad->c_password_entry);\r
+               if (input_entry_str != NULL && strlen(input_entry_str) > 0 ) {\r
+                       int cursor_pos = elm_entry_cursor_pos_get(ad->c_password_entry);\r
+\r
+                       if (cursor_pos > 0) {\r
+                               Eina_Strbuf *temp_str_buf = eina_strbuf_new();\r
+                               eina_strbuf_append(temp_str_buf, input_entry_str);\r
+                               eina_strbuf_remove(temp_str_buf, cursor_pos - 1, cursor_pos);\r
+                               elm_entry_entry_set(ad->c_password_entry, eina_strbuf_string_get(temp_str_buf));\r
+                               elm_entry_cursor_pos_set(ad->c_password_entry,\r
+                                               (cursor_pos - 1 > 0) ? cursor_pos -1 : 0);\r
+                               eina_strbuf_free(temp_str_buf);\r
+                       }\r
+               }\r
+       } else if (strcasecmp("enter", source) == 0) {\r
+               if(ad->is_disabled) {\r
+                       return;\r
+               }\r
+               password_verification_verify(ad->h_password_policy, elm_entry_entry_get(ad->c_password_entry));\r
+       } else {\r
+               if(ad->is_disabled) {\r
+                       return;\r
+               }\r
+               elm_entry_entry_insert(ad->c_password_entry, source);\r
+       }\r
+}\r
+\r
+static void __complex_password_layout_destroy(void *data, Evas_Object *obj, const char *emission, const char *source)\r
+{\r
+       struct appdata *ad = data;\r
+\r
+       if(ad->ly_complex_password){\r
+               evas_object_del(ad->ly_complex_password);\r
+               ad->ly_complex_password = NULL;\r
+       }\r
+       password_verification_policy_destroy(ad->h_password_policy);\r
+       lockscreen_info_show(ad);\r
+}\r
+\r
+static void __complex_password_mouse_down_cb(void *data, Evas * evas, Evas_Object * obj,\r
+                           void *event_info)\r
+{\r
+       Evas_Event_Mouse_Down *ei = event_info;\r
+\r
+       complex_pw_down_y = ei->output.y;\r
+\r
+       LOCK_SCREEN_TRACE_DBG("complex_pw_down_y = %d", complex_pw_down_y);\r
+}\r
+\r
+static void __complex_password_mouse_up_cb(void *data, Evas * evas, Evas_Object * obj,\r
+                         void *event_info)\r
+{\r
+       struct appdata *ad = data;\r
+       Evas_Event_Mouse_Down *ei = event_info;\r
+\r
+       Evas_Coord pos_up_y = ei->output.y;\r
+\r
+       if((pos_up_y - complex_pw_down_y) > _X(300)){\r
+               edje_object_signal_emit(_EDJ(ad->ly_complex_password), "hide,qwertykeyboard", "sw.keypad.qwerty");\r
+               edje_object_signal_callback_add(_EDJ(ad->ly_complex_password), "hide,complexpw", "event", __complex_password_layout_destroy, ad);\r
+       }\r
+}\r
+\r
+static void __complex_password_mouse_move_cb(void *data, Evas * evas, Evas_Object * obj,\r
+                           void *event_info)\r
+{\r
+       LOCK_SCREEN_TRACE_DBG("__complex_password_mouse_move_cb");\r
+}\r
+\r
+void __complex_password_check_result(void *data)\r
+{\r
+       struct appdata *ad = (struct appdata *) data;\r
+\r
+       int value = -1;\r
+\r
+       vconf_get_int(VCONFKEY_SETAPPL_PASSWORD_ATTEMPTS_LEFT_INT, &value);\r
+       value--;\r
+\r
+       if (value > 0 && value <= PASSWORD_ATTEMPTS_MAX_NUM) {\r
+               char temp_str[200] = {0};\r
+               char temp_left[50] = {0};\r
+\r
+               vconf_set_int(VCONFKEY_SETAPPL_PASSWORD_ATTEMPTS_LEFT_INT,\r
+                             value);\r
+               if(value == 1)\r
+               {\r
+                       snprintf(temp_left, sizeof(temp_left), _L("1 attempt left."));\r
+               }\r
+               else\r
+               {\r
+                       snprintf(temp_left, sizeof(temp_left), _L("%d attempts left."), value);\r
+               }\r
+               snprintf(temp_str, sizeof(temp_str), "%s, %s", _L("Wrong password"), temp_left);\r
+               edje_object_part_text_set(_EDJ(ad->ly_complex_password), "txt.result", temp_str);\r
+       } else if (value == 0) {\r
+               time_t cur_time = time(NULL);\r
+               char cur_timestamp[64] = {0};\r
+               char temp_str[512] = {0};\r
+\r
+               snprintf(cur_timestamp, sizeof(cur_timestamp), "%ld", cur_time);\r
+               vconf_set_str(VCONFKEY_SETAPPL_PASSWORD_TIMESTAMP_STR, cur_timestamp);\r
+               vconf_set_int(VCONFKEY_SETAPPL_PASSWORD_ATTEMPTS_LEFT_INT, value);\r
+               ad->block_seconds = PASSWORD_BLOCK_SECONDS;\r
+\r
+               snprintf(temp_str, sizeof(temp_str), _L("Input password again after %d seconds."), ad->block_seconds);\r
+               edje_object_part_text_set(_EDJ(ad->ly_complex_password), "txt.result", temp_str);\r
+       }\r
+}\r
+\r
+static void __complex_password_check_result_cb (const char *event, void *data)\r
+{\r
+       struct appdata *ad = (struct appdata *) data;\r
+       if (ad == NULL) {\r
+               return;\r
+       }\r
+\r
+       if(strcasecmp("empty", event) == 0 || strcasecmp("overlength", event) == 0) {\r
+               char temp_str[100] = {0};\r
+               snprintf(temp_str, sizeof(temp_str), _L("%d to %d digits or letters required"), MIN_PASSWORD_NUM, MAX_PASSWORD_NUM);\r
+               edje_object_part_text_set(_EDJ(ad->ly_complex_password), "txt.result", temp_str);\r
+       }else {\r
+               __complex_password_check_result(data);\r
+       }\r
+}\r
+\r
+static void __complex_password_results_update(void *data)\r
+{\r
+       int value = -1;\r
+       int ret = 0;\r
+\r
+       struct appdata *ad = (struct appdata *) data;\r
+\r
+       if (ad == NULL) {\r
+               return;\r
+       }\r
+       LOCK_SCREEN_TRACE_DBG("%s", __FUNCTION__);\r
+\r
+       ret =\r
+           vconf_get_int(VCONFKEY_SETAPPL_PASSWORD_ATTEMPTS_LEFT_INT,\r
+                         &value);\r
+\r
+       if (ret != 0) {\r
+               return;\r
+       }\r
+\r
+       if (value == 0) {\r
+               char timestamp_str[512] = {0};\r
+               char *temp = NULL;\r
+               int length = 0;\r
+               int temp_length = 0;\r
+               temp = vconf_get_str(VCONFKEY_SETAPPL_PASSWORD_TIMESTAMP_STR);\r
+               temp_length = strlen(temp);\r
+               length = (temp_length <= PASSWORD_TIMESTAMP_STR_LENGTH) ? temp_length : PASSWORD_TIMESTAMP_STR_LENGTH;\r
+               strncpy(timestamp_str, temp, length);\r
+               timestamp_str[length] = '\0';\r
+               if ((strcmp(timestamp_str, "") != 0)\r
+                   || (strlen(timestamp_str) != 0)) {\r
+                       time_t cur_time = time(NULL);\r
+                       time_t last_lock_time;\r
+                       sscanf(timestamp_str, "%ld", &last_lock_time);\r
+\r
+                       if ((cur_time - last_lock_time) < PASSWORD_BLOCK_SECONDS) {\r
+                               ad->block_seconds = PASSWORD_BLOCK_SECONDS - (cur_time - last_lock_time);\r
+                               LOCK_SCREEN_TRACE_DBG("ad->block_seconds = %d", ad->block_seconds);\r
+                               ad->is_disabled = EINA_TRUE;\r
+                               char temp_str[512] = {0};\r
+                               snprintf(temp_str, sizeof(temp_str), _L("Input password again after %d seconds."), ad->block_seconds);\r
+                               edje_object_part_text_set(_EDJ(ad->ly_complex_password), "txt.result", temp_str);\r
+                       } else {\r
+                               ad->is_disabled = EINA_FALSE;\r
+                               vconf_set_int(VCONFKEY_SETAPPL_PASSWORD_ATTEMPTS_LEFT_INT, PASSWORD_ATTEMPTS_MAX_NUM);\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
+static Eina_Bool __complex_password_results_update_cb(void *data)\r
+{\r
+       __complex_password_results_update(data);\r
+       return EINA_TRUE;\r
+}\r
+\r
+static void __complex_password_check_vconf_value(void *data)\r
+{\r
+       int phone_lock_value = -1;\r
+       struct appdata *ad = (struct appdata *) data;\r
+\r
+       if (ad == NULL) {\r
+               return;\r
+       }\r
+       LOCK_SCREEN_TRACE_DBG("%s", __FUNCTION__);\r
+\r
+       vconf_get_int(VCONFKEY_SETAPPL_PASSWORD_ATTEMPTS_LEFT_INT, &phone_lock_value);\r
+\r
+       if (phone_lock_value == 0) {\r
+               if (ad->password_timer) {\r
+                       return;\r
+               }\r
+               ad->password_timer = ecore_timer_add(1, (Ecore_Task_Cb)__complex_password_results_update_cb, ad);\r
+       } else {\r
+               if (ad->password_timer) {\r
+                       ecore_timer_del(ad->password_timer);\r
+                       ad->password_timer = NULL;\r
+               }\r
+               ad->is_disabled = EINA_FALSE;\r
+       }\r
+}\r
+\r
+static void __complex_password_check_vconf_value_cb(keynode_t * key, void *data)\r
+{\r
+       __complex_password_check_vconf_value(data);\r
+}\r
+\r
+static void __complex_password_customize_entry(Evas_Object * entry)\r
+{\r
+       static Elm_Entry_Filter_Limit_Size limit_filter_data_alpha;\r
+       Elm_Theme *th = elm_theme_new();\r
+       elm_theme_ref_set(th, NULL);\r
+       elm_theme_extension_add(th, EDJ_LOCKSCREEN_ENTRY);\r
+       elm_object_theme_set(entry, th);\r
+       elm_object_style_set(entry, "lockscreen_complex_password_style");\r
+       limit_filter_data_alpha.max_char_count = MAX_PASSWORD_NUM;\r
+       limit_filter_data_alpha.max_byte_count = 0;\r
+       elm_entry_markup_filter_append(entry, elm_entry_filter_limit_size,\r
+                                      &limit_filter_data_alpha);\r
+}\r
+\r
+void complex_password_layout_create(void *data)\r
+{\r
+       struct appdata *ad = (struct appdata *)data;\r
+       if(ad == NULL){\r
+               return;\r
+       }\r
+\r
+       Evas_Object *keypad_layout = NULL;\r
+\r
+       ad->h_password_policy = password_verification_policy_create();\r
+       password_verification_callback_set(ad->h_password_policy, __complex_password_check_result_cb, ad);\r
+       lockscreen_info_hide(ad);\r
+       ad->ly_complex_password = elm_layout_add(ad->ly_main);\r
+       elm_layout_file_set(ad->ly_complex_password, EDJEFILE, "lock-complex-password");\r
+       elm_object_part_content_set(ad->ly_main, "sw.phone-lock", ad->ly_complex_password);\r
+       edje_object_part_text_set(_EDJ(ad->ly_complex_password), "txt.title", _S("IDS_COM_BODY_ENTER_PASSWORD"));\r
+\r
+       Evas_Object *entry = NULL;\r
+       entry = elm_entry_add(ad->ly_complex_password);\r
+       __complex_password_customize_entry(entry);\r
+       elm_entry_single_line_set(entry, EINA_TRUE);\r
+       elm_entry_password_set(entry, EINA_TRUE);\r
+       elm_entry_entry_set(entry, "");\r
+       elm_entry_cursor_end_set(entry);\r
+       elm_entry_scrollable_set(entry, EINA_TRUE);\r
+       elm_object_part_content_set(ad->ly_complex_password, "sw.password", entry);\r
+       Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(entry);\r
+       ecore_imf_context_input_panel_enabled_set(imf_context, EINA_FALSE);\r
+       ad->c_password_entry = entry;\r
+\r
+       keypad_layout = elm_layout_add(ad->ly_complex_password);\r
+       elm_layout_file_set(keypad_layout, EDJEFILE, "lock-keypad-qwerty");\r
+       elm_object_part_content_set(ad->ly_complex_password, "sw.keypad.qwerty", keypad_layout);\r
+       edje_object_signal_emit(_EDJ(ad->ly_complex_password), "show,qwertykeyboard", "sw.keypad.qwerty");\r
+       edje_object_signal_callback_add(_EDJ(keypad_layout), "pad_qwerty_clicked", "*", __complex_password_keypad_process, ad);\r
+       evas_object_event_callback_add(ad->ly_complex_password, EVAS_CALLBACK_MOUSE_DOWN, __complex_password_mouse_down_cb, ad);\r
+       evas_object_event_callback_add(ad->ly_complex_password, EVAS_CALLBACK_MOUSE_MOVE, __complex_password_mouse_move_cb, ad);\r
+       evas_object_event_callback_add(ad->ly_complex_password, EVAS_CALLBACK_MOUSE_UP, __complex_password_mouse_up_cb, ad);\r
+       evas_object_show(keypad_layout);\r
+\r
+       vconf_notify_key_changed(VCONFKEY_SETAPPL_PASSWORD_ATTEMPTS_LEFT_INT, __complex_password_check_vconf_value_cb, ad);\r
+       __complex_password_check_vconf_value(ad);\r
+}\r
diff --git a/src/complex-password.h b/src/complex-password.h
new file mode 100755 (executable)
index 0000000..a4ee718
--- /dev/null
@@ -0,0 +1,22 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the License);\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *  http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an AS IS BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __COMPLEX_PASSWORD_H__\r
+#define __COMPLEX_PASSWORD_H__\r
+\r
+void complex_password_layout_create(void *data);\r
+\r
+#endif\r
diff --git a/src/info.c b/src/info.c
new file mode 100755 (executable)
index 0000000..2591b0e
--- /dev/null
@@ -0,0 +1,181 @@
+/*
+ * 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 <appcore-common.h>
+#include <vconf.h>
+#include <vconf-keys.h>
+#include <dlog.h>
+#include <app_service.h>
+
+#include <unicode/udat.h>
+#include <unicode/udatpg.h>
+
+#include "lockscreen.h"
+#include "log.h"
+
+static Ecore_Timer *timer = NULL;
+
+static bool get_formatted_date_from_utc_time(time_t* utc_time, char* date_str, int date_size)
+{
+       UErrorCode status = U_ZERO_ERROR;
+       UDateTimePatternGenerator *generator;
+       UDateFormat *formatter;
+       UChar skeleton[40] = { 0 }
+               , pattern[40] = { 0 }
+               , formatted[40] = { 0 };
+       int32_t patternCapacity, formattedCapacity;
+       int32_t skeletonLength, patternLength, formattedLength;
+       UDate date;
+       const char *locale;
+       const char customSkeleton[] = UDAT_MONTH_WEEKDAY_DAY;
+
+       date = (UDate) (*utc_time) *1000;
+
+       uloc_setDefault(__secure_getenv("LC_TIME"), &status);
+       locale = uloc_getDefault();
+
+       generator = udatpg_open(locale, &status);
+       if (generator == NULL)
+               return false;
+
+       patternCapacity = (int32_t) (sizeof(pattern) / sizeof((pattern)[0]));
+
+       u_uastrcpy(skeleton, customSkeleton);
+
+       skeletonLength = strlen(customSkeleton);
+
+       patternLength =
+               udatpg_getBestPattern(generator, skeleton, skeletonLength, pattern,
+                               patternCapacity, &status);
+
+       formatter =
+               udat_open(UDAT_IGNORE, UDAT_DEFAULT, locale, NULL, -1, pattern,
+                       patternLength, &status);
+       if (formatter == NULL) {
+               udatpg_close(generator);
+               return false;
+       }
+
+       formattedCapacity =
+               (int32_t) (sizeof(formatted) / sizeof((formatted)[0]));
+
+       formattedLength =
+               udat_format(formatter, date, formatted, formattedCapacity, NULL,
+                       &status);
+
+       u_austrcpy(date_str, formatted);
+
+       udatpg_close(generator);
+
+       udat_close(formatter);
+
+       return true;
+}
+
+static Eina_Bool _set_info_time(void *data)
+{
+       Evas_Object *info = (Evas_Object *) data;
+       if (info == NULL)
+               return false;
+
+       struct tm st;
+       time_t tt;
+       char buf[512] = { 0, };
+       char bf1[32] = { 0, };
+       char bf2[32] = { 0, };
+       int r, hour;
+       enum appcore_time_format timeformat;
+
+       tt = time(NULL);
+       localtime_r(&tt, &st);
+
+       if (timer != NULL) {
+               ecore_timer_del(timer);
+               timer = NULL;
+       }
+
+       char utc_date[256] = { 0, };
+       get_formatted_date_from_utc_time(&tt, utc_date, sizeof(utc_date));
+       edje_object_part_text_set(_EDJ(info), "txt.date", utc_date);
+
+       timer = ecore_timer_add(60 - st.tm_sec, _set_info_time, info);
+
+       r = appcore_get_timeformat(&timeformat);
+       if (r == 0 && timeformat == APPCORE_TIME_FORMAT_24) {
+               strftime(bf1, sizeof(bf1), "%H:%M", &st);
+               snprintf(buf, sizeof(buf), "%s", bf1);
+       } else {
+               strftime(bf1, sizeof(bf1), "%l", &st);
+               hour = atoi(bf1);
+               strftime(bf1, sizeof(bf1), ":%M", &st);
+               snprintf(buf, sizeof(buf), "%d%s", hour, bf1);
+               if (st.tm_hour >= 0 && st.tm_hour < 12) {
+                       snprintf(bf2, sizeof(bf2), "%s", "AM");
+                       if ((st.tm_hour - 10) < 0 && st.tm_hour != 0) {
+                               edje_object_signal_emit(_EDJ(info), "digit,clock", "rect.clock.ampm");
+                       } else {
+                               edje_object_signal_emit(_EDJ(info), "default,clock", "rect.clock.ampm");
+                       }
+               } else {
+                       snprintf(bf2, sizeof(bf2), "%s", "PM");
+                       if ((st.tm_hour - 12) < 10 && (st.tm_hour - 12) != 0) {
+                               edje_object_signal_emit(_EDJ(info), "digit,clock", "rect.clock.ampm");
+                       } else {
+                               edje_object_signal_emit(_EDJ(info), "default,clock", "rect.clock.ampm");
+                       }
+               }
+               edje_object_part_text_set(_EDJ(info), "txt.clock.ampm", bf2);
+       }
+       edje_object_part_text_set(_EDJ(info), "txt.clock", buf);
+
+       return 0;
+}
+
+static void _set_info_helptext(void *data)
+{
+       struct appdata *ad = data;
+       if (ad == NULL) {
+               return;
+       }
+
+       edje_object_part_text_set(_EDJ(ad->info), "txt.helptext", _NOT_LOCALIZED("Drag along the dots to unlock"));
+}
+
+void _set_info(void *data)
+{
+       LOGD("[ == %s == ]", __func__);
+       struct appdata *ad = data;
+       if (ad == NULL) {
+               return;
+       }
+
+       int is_clock = -1;
+       int is_helptext = -1;
+
+       int retc = vconf_get_bool(VCONFKEY_LOCKSCREEN_CLOCK_DISPLAY, &is_clock);
+       int retht = vconf_get_bool(VCONFKEY_LOCKSCREEN_HELP_TEXT_DISPLAY, &is_helptext);
+
+       if(0 == retc) {
+               if(is_clock) {
+                       _set_info_time(ad->info);
+               }
+       }
+       if(0 == retht) {
+               if(is_helptext) {
+                       _set_info_helptext(ad);
+               }
+       }
+}
diff --git a/src/info.h b/src/info.h
new file mode 100755 (executable)
index 0000000..249e450
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * 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 __INFO_H__
+#define __INFO_H__
+
+void _set_info(void *data);
+
+#endif
diff --git a/src/lockscreen.c b/src/lockscreen.c
new file mode 100755 (executable)
index 0000000..18449d1
--- /dev/null
@@ -0,0 +1,169 @@
+/*
+ * 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 <app.h>
+#include <vconf.h>
+#include <Ecore_X.h>
+
+#include "lockscreen.h"
+#include "util.h"
+
+static void win_del(void *data, Evas_Object * obj, void *event)
+{
+       elm_exit();
+}
+
+static Evas_Object *create_win(const char *name)
+{
+       if (name == NULL)
+               return NULL;
+
+       Evas_Object *eo;
+       int w, h;
+
+       eo = elm_win_add(NULL, name, ELM_WIN_BASIC);
+       if (!eo) {
+               LOGE("[%s:%d] eo is NULL", __func__, __LINE__);
+               return NULL;
+       }
+
+       elm_win_title_set(eo, name);
+       elm_win_borderless_set(eo, EINA_TRUE);
+       evas_object_smart_callback_add(eo, "delete,request", win_del, NULL);
+       ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h);
+       evas_object_resize(eo, w, h);
+       elm_win_alpha_set(eo, EINA_TRUE);
+
+       return eo;
+}
+
+static void resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+       Evas_Coord w;
+       Evas_Coord h;
+
+       evas_object_geometry_get(obj, NULL, NULL, &w, &h);
+}
+
+static bool app_create(void *data)
+{
+       struct appdata *ad = data;
+       LOGD("[ == %s == ]", __func__);
+       if (ad == NULL)
+               return false;
+
+       ad->win = NULL;
+       ad->ly_main = NULL;
+       ad->info = NULL;
+       ad->event_bg = NULL;
+       ad->slider = NULL;
+       ad->bDrag = 0;
+
+       Evas_Object *win = NULL;
+
+       ecore_x_window_size_get(ecore_x_window_root_first_get(), &ad->win_w, &ad->win_h);
+       LOGD("[%s:%d] win_w : %d, win_h : %d", __func__, __LINE__, ad->win_w, ad->win_h);
+
+       win = create_win(PACKAGE);
+       if (win == NULL)
+               return false;
+       ad->win = win;
+       elm_win_conformant_set(ad->win, EINA_TRUE);
+       evas_object_resize(win, ad->win_w, ad->win_h);
+       evas_object_event_callback_add(win, EVAS_CALLBACK_RESIZE, resize_cb, NULL);
+
+       int ret = _app_create(ad);
+       if(ret == -1)
+               return false;
+
+       return true;
+}
+
+static void app_service(service_h service, void *data)
+{
+       struct appdata *ad = data;
+       LOGD("[ == %s == ]", __func__);
+       if (ad == NULL)
+               return;
+
+       if (ad->win)
+               elm_win_activate(ad->win);
+
+       _app_reset(ad);
+}
+
+static void app_terminate(void *data)
+{
+       struct appdata *ad = data;
+       LOGD("[ == %s == ]", __func__);
+       if (ad == NULL)
+               return;
+
+       if (ad->ly_main)
+               evas_object_del(ad->ly_main);
+
+       if (ad->win)
+               evas_object_del(ad->win);
+}
+
+static void app_pause(void *data)
+{
+       struct appdata *ad = data;
+       LOGD("[ == %s == ]", __func__);
+       if (ad == NULL)
+               return;
+}
+
+static void app_resume(void *data)
+{
+       struct appdata *ad = data;
+       LOGD("[ == %s == ]", __func__);
+       if (ad == NULL)
+               return;
+}
+
+static void device_orientation(app_device_orientation_e orientation, void * data)
+{
+       struct appdata *ad = data;
+       LOGD("[ == %s == ]", __func__);
+       if (ad == NULL || ad->win == NULL)
+               return;
+}
+
+int main(int argc, char *argv[])
+{
+       struct appdata ad;
+
+       app_event_callback_s event_callback;
+
+       event_callback.create = app_create;
+       event_callback.terminate = app_terminate;
+       event_callback.pause = app_pause;
+       event_callback.resume = app_resume;
+       event_callback.service = app_service;
+       event_callback.low_memory = NULL;
+       event_callback.low_battery = NULL;
+       event_callback.device_orientation = device_orientation;
+       event_callback.language_changed = NULL;
+       event_callback.region_format_changed = NULL;
+
+       memset(&ad, 0x0, sizeof(struct appdata));
+
+       setenv("ELM_ENGINE", "gl", 1);
+
+       return app_efl_main(&argc, &argv, &event_callback, &ad);
+}
diff --git a/src/lockscreen.h b/src/lockscreen.h
new file mode 100755 (executable)
index 0000000..c380c3b
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * 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 __LOCKSCREEN_H__
+#define __LOCKSCREEN_H__
+
+#include <Elementary.h>
+#include "log.h"
+
+#if !defined(PACKAGE)
+#define PACKAGE "lockscreen"
+#endif
+
+#if !defined(EDJDIR)
+#define EDJDIR "/usr/apps/org.tizen."PACKAGE"/res/edje/lockscreen"
+#endif
+
+#define EDJEFILE EDJEDIR"/"PACKAGE".edj"
+
+#define _S(str)        dgettext("sys_string", str)
+#define _L(str) dgettext("lockscreen", str)
+#define _NOT_LOCALIZED(str) (str)
+
+#define _EDJ(x) elm_layout_edje_get(x)
+#define _X(x) (x*elm_config_scale_get())
+
+#define FLICK_LINE 898
+#define SLIDER_RATIO_H 0.089
+#define SLIDER_RATIO_Y 0.872
+
+enum {
+       POS_DOWN = 0,
+       POS_MOVE,
+       POS_UP,
+       POS_REC,//to record the pre position
+       STEP,
+       POS_MAX
+};
+
+struct appdata {
+       Evas_Object *win;
+       Evas_Object *ly_main;//top_layout
+
+       Evas_Coord win_w;
+       Evas_Coord win_h;
+       Evas_Coord posx[POS_MAX];
+       Evas_Coord posy[POS_MAX];
+
+       Evas_Object *info;//time
+       Evas_Object *noti;
+       Evas_Object *ly_simple_password;
+       Evas_Object *ly_complex_password;
+       Evas_Object *c_password_entry;
+       Evas_Object *event_bg;
+       Evas_Object *slider;
+
+       Evas_Coord_Rectangle slider_rel1;
+       Evas_Coord_Rectangle slider_rel2;
+
+       Eina_Bool bFlick;//flick to launch shorcuts
+       Eina_Bool bDrag;//for drag lock
+
+       void *h_password_policy;
+       Ecore_Timer *password_timer;
+       int block_seconds;
+       Eina_Bool is_disabled;
+};
+
+#endif
diff --git a/src/log.h b/src/log.h
new file mode 100755 (executable)
index 0000000..4f03645
--- /dev/null
+++ b/src/log.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *  http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __LOG_H__
+#define __LOG_H__
+
+#include <dlog.h>
+
+#ifdef  LOG_TAG
+#undef  LOG_TAG
+#endif
+
+#define LOG_TAG "lockscreen"
+#define ENABLE_LOG_SYSTEM
+
+#ifdef ENABLE_LOG_SYSTEM
+#define LOCK_SCREEN_TRACE_ERR(fmt, arg...)  LOGE("["LOG_TAG"%s:%d:E] : %s "fmt, __FILE__, __LINE__, __func__, ##arg)
+#define LOCK_SCREEN_TRACE_DBG(fmt, arg...)  LOGD("["LOG_TAG"%s:%d:D] : %s "fmt, __FILE__, __LINE__, __func__, ##arg)
+#define LOCK_SCREEN_TRACE_WARN(fmt, arg...) LOGW("["LOG_TAG"%s:%d:D] : %s "fmt, __FILE__, __LINE__, __func__, ##arg)
+#else
+#define LOCK_SCREEN_TRACE_ERR(fmt, arg...)
+#define LOCK_SCREEN_TRACE_DBG(fmt, arg...)
+#define LOCK_SCREEN_TRACE_WARN(fmt, arg...)
+#endif
+
+#endif
diff --git a/src/noti.c b/src/noti.c
new file mode 100755 (executable)
index 0000000..977f29a
--- /dev/null
@@ -0,0 +1,185 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the License);\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *  http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an AS IS BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <notification.h>\r
+#include <vconf.h>\r
+#include <vconf-keys.h>\r
+\r
+#include "lockscreen.h"\r
+#include "log.h"\r
+\r
+#define PHONE_LAUNCH_PKG               "org.tizen.phone"\r
+#define EMAIL_LAUNCH_PKG               "org.tizen.email"\r
+#define MESSAGE_LAUNCH_PKG             "org.tizen.message"\r
+#define MAX_NOTI_NUM                   3\r
+\r
+static void __noti_info_set(void *data, const char *pkgname, const char *title, int count, int line_num)\r
+{\r
+       struct appdata *ad = (struct appdata *)data;\r
+       if(ad == NULL || pkgname == NULL){\r
+               return;\r
+       }\r
+\r
+       LOCK_SCREEN_TRACE_DBG("pkgname : %s, title : %s, count = %d, line_num = %d", pkgname, title, count, line_num);\r
+\r
+       char buf1[512] = {0};\r
+       char buf2[512] = {0};\r
+\r
+       snprintf(buf2, sizeof(buf2), "noti_title%d", line_num);\r
+\r
+       if (!strcmp(pkgname, PHONE_LAUNCH_PKG)) {\r
+               if(count == 1){\r
+                       snprintf(buf1, sizeof(buf1), "%d %s", count, _NOT_LOCALIZED("Missed call"));\r
+               }else if(count > 1){\r
+                       snprintf(buf1, sizeof(buf1), "%d %s", count, _NOT_LOCALIZED("Missed calls"));\r
+               }\r
+               edje_object_part_text_set(_EDJ(ad->noti), buf2, buf1);\r
+       } else if (!strcmp(pkgname, MESSAGE_LAUNCH_PKG)) {\r
+               if(count == 1){\r
+                       snprintf(buf1, sizeof(buf1), "%d %s", count, _NOT_LOCALIZED("New message"));\r
+               }else if(count > 1){\r
+                       snprintf(buf1, sizeof(buf1), "%d %s", count, _NOT_LOCALIZED("New messages"));\r
+               }\r
+               edje_object_part_text_set(_EDJ(ad->noti), buf2, buf1);\r
+       } else if (!strcmp(pkgname, EMAIL_LAUNCH_PKG)) {\r
+               if(count == 1){\r
+                       snprintf(buf1, sizeof(buf1), "%d %s", count, _NOT_LOCALIZED("New email"));\r
+               }else if(count > 1){\r
+                       snprintf(buf1, sizeof(buf1), "%d %s", count, _NOT_LOCALIZED("New emails"));\r
+               }\r
+               edje_object_part_text_set(_EDJ(ad->noti), buf2, buf1);\r
+       } else {\r
+               edje_object_part_text_set(_EDJ(ad->noti), buf2, title);\r
+       }\r
+}\r
+\r
+static int __ticker_check_setting_event_value(notification_h noti)\r
+{\r
+       char *pkgname = NULL;\r
+       char key[512] = {0, };\r
+       int ret = 0;\r
+       int boolval = 0;\r
+\r
+       notification_get_application(noti, &pkgname);\r
+\r
+       if (pkgname == NULL) {\r
+               notification_get_pkgname(noti, &pkgname);\r
+       }\r
+\r
+       if (pkgname == NULL) {\r
+               return 0;\r
+       }\r
+\r
+       if (!strcmp(pkgname, MESSAGE_LAUNCH_PKG)) {\r
+               ret = vconf_get_bool(VCONFKEY_SETAPPL_STATE_TICKER_NOTI_MESSAGES_BOOL, &boolval);\r
+               if (ret == 0 && boolval == 0) {\r
+                       return 0;\r
+               }\r
+       } else if (!strcmp(pkgname, EMAIL_LAUNCH_PKG)) {\r
+               ret = vconf_get_bool(VCONFKEY_SETAPPL_STATE_TICKER_NOTI_EMAIL_BOOL, &boolval);\r
+               if (ret == 0 && boolval == 0) {\r
+                       return 0;\r
+               }\r
+       }\r
+\r
+       snprintf(key, sizeof(key), "db/app-settings/noti-enabled/%s", pkgname);\r
+       ret = vconf_get_int(key, &boolval);\r
+       if (ret == 0 && boolval == 0) {\r
+               return 0;\r
+       }\r
+\r
+       return 1;\r
+}\r
+\r
+static void __noti_changed_cb(void *data, notification_type_e type)\r
+{\r
+       notification_h noti = NULL;\r
+       notification_list_h notification_list = NULL;\r
+       notification_list_h get_list = NULL;\r
+       int count = 0, group_id = 0, priv_id = 0, show_noti = 0, num = 1;\r
+       char *pkgname = NULL;\r
+       char *title = NULL;\r
+       char *str_count = NULL;\r
+       int i = 1;\r
+       char buf[512] = {0};\r
+       struct appdata *ad = (struct appdata *)data;\r
+\r
+       for(i = 1; i <= MAX_NOTI_NUM; i++){\r
+               snprintf(buf, sizeof(buf), "noti_title%d", i);\r
+               edje_object_part_text_set(_EDJ(ad->noti), buf, "");\r
+       }\r
+\r
+       notification_get_list(NOTIFICATION_TYPE_NOTI, -1, &notification_list);\r
+       if (notification_list) {\r
+               get_list = notification_list_get_head(notification_list);\r
+               noti = notification_list_get_data(get_list);\r
+               LOCK_SCREEN_TRACE_DBG("get_list : %p, noti : %p", get_list, noti);\r
+               while(get_list != NULL) {\r
+                       notification_get_id(noti, &group_id, &priv_id);\r
+                       notification_get_pkgname(noti, &pkgname);\r
+                       if(pkgname == NULL){\r
+                               notification_get_application(noti, &pkgname);\r
+                       }\r
+                       show_noti = __ticker_check_setting_event_value(noti);\r
+                       LOCK_SCREEN_TRACE_DBG("show noti : %d", show_noti);\r
+                       if (show_noti == 0) {\r
+                               get_list = notification_list_get_next(get_list);\r
+                               noti = notification_list_get_data(get_list);\r
+                               continue;\r
+                       }\r
+\r
+                       if(num > MAX_NOTI_NUM){\r
+                               if (notification_list != NULL) {\r
+                                       notification_free_list(notification_list);\r
+                                       notification_list = NULL;\r
+                               }\r
+                               return;\r
+                       }\r
+\r
+                       notification_get_text(noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT, &str_count);\r
+                       if (!str_count) {\r
+                               count = 0;\r
+                       } else {\r
+                               count = atoi(str_count);\r
+                       }\r
+                       notification_get_title(noti, &title, NULL);\r
+                       __noti_info_set(data, pkgname, title, count, num);\r
+                       get_list = notification_list_get_next(get_list);\r
+                       noti = notification_list_get_data(get_list);\r
+                       num++;\r
+               }\r
+       }\r
+       if (notification_list != NULL) {\r
+               notification_free_list(notification_list);\r
+               notification_list = NULL;\r
+       }\r
+}\r
+\r
+void noti_process(void *data)\r
+{\r
+       struct appdata *ad = (struct appdata *)data;\r
+       if(ad == NULL){\r
+               return;\r
+       }\r
+\r
+       ad->noti = elm_layout_add(ad->ly_main);\r
+       elm_layout_file_set(ad->noti, EDJEFILE, "lock-noti");\r
+       evas_object_show(ad->noti);\r
+       elm_object_part_content_set(ad->ly_main, "sw.noti", ad->noti);\r
+\r
+       notification_resister_changed_cb(__noti_changed_cb, ad);\r
+       __noti_changed_cb(ad, NOTIFICATION_TYPE_NOTI);\r
+}\r
diff --git a/src/noti.h b/src/noti.h
new file mode 100755 (executable)
index 0000000..a8d17ab
--- /dev/null
@@ -0,0 +1,22 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the License);\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *  http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an AS IS BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __NOTI_H__\r
+#define __NOTI_H__\r
+\r
+void noti_process(void *data);\r
+\r
+#endif\r
diff --git a/src/password-verification.c b/src/password-verification.c
new file mode 100755 (executable)
index 0000000..9e4093b
--- /dev/null
@@ -0,0 +1,282 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the License);\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *  http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an AS IS BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <Elementary.h>\r
+#include <sys/types.h>\r
+#include <unistd.h>\r
+#include <security-server.h>\r
+#include <mdm.h>\r
+#include <vconf.h>\r
+#include <vconf-keys.h>\r
+\r
+#include "log.h"\r
+#include "password-verification.h"\r
+\r
+typedef enum {\r
+       NORMAL_PASSWORD = 0,\r
+       EMPTY_PASSWORD,\r
+       OVERLENGTH_PASSWORD,\r
+}lockscreen_password_type;\r
+\r
+typedef struct {\r
+       unsigned int current_attempt;\r
+       unsigned int max_attempt;\r
+       unsigned int expire_sec;\r
+       int recoverable;\r
+       int mdm_quality;\r
+       password_operation_cb callback;\r
+       void *data;\r
+} lockscreen_password_policy;\r
+\r
+static Eina_Bool __password_verification_check_pw_expired(void *data)\r
+{\r
+       lockscreen_password_policy *password_policy = (lockscreen_password_policy *)data;\r
+       if (!password_policy) {\r
+               return EINA_FALSE;\r
+       }\r
+\r
+       LOCK_SCREEN_TRACE_DBG("Checking pw expired => valid_secs:%d:%d", password_policy->expire_sec);\r
+\r
+       if (password_policy->expire_sec == 0) {\r
+               return EINA_TRUE;\r
+       } else\r
+               return EINA_FALSE;\r
+}\r
+\r
+static Eina_Bool __password_verification_check_recovery(void *data)\r
+{\r
+       lockscreen_password_policy *password_policy = (lockscreen_password_policy *)data;\r
+       if (!password_policy) {\r
+               return EINA_FALSE;\r
+       }\r
+\r
+       LOCK_SCREEN_TRACE_DBG("Checking recovery => current_attempt:%d max_attempt:%d",\r
+               password_policy->current_attempt, password_policy->max_attempt);\r
+\r
+       if ((password_policy->max_attempt != 0) && (password_policy->max_attempt == password_policy->current_attempt))  {\r
+               password_policy->recoverable = 1;\r
+               return EINA_TRUE;\r
+       } else\r
+               return EINA_FALSE;\r
+}\r
+\r
+static Eina_Bool __password_verification_check_phone_password(void *data, const char *str)\r
+{\r
+       LOCK_SCREEN_TRACE_DBG("%s : %s\n", __FUNCTION__, str);\r
+\r
+       lockscreen_password_policy *lock_policy = (lockscreen_password_policy *)data;\r
+\r
+       int ret = SECURITY_SERVER_API_ERROR_PASSWORD_MISMATCH;\r
+\r
+       unsigned int current_attempt = 0;\r
+       unsigned int max_attempt = 0;\r
+       unsigned int valid_secs = 0;\r
+\r
+       if(!lock_policy) {\r
+               LOCK_SCREEN_TRACE_DBG("lock_policy is NULL");\r
+               return EINA_FALSE;\r
+       }\r
+\r
+       ret = security_server_chk_pwd(str, &current_attempt, &max_attempt, &valid_secs);\r
+       LOCK_SCREEN_TRACE_DBG("security_server_chk_pwd => ret:%d current_attempt:%d max_attempt:%d valid_secs:%d",\r
+               ret, current_attempt, max_attempt, valid_secs);\r
+       lock_policy->current_attempt = current_attempt;\r
+       lock_policy->max_attempt = max_attempt;\r
+       lock_policy->expire_sec = valid_secs;\r
+       if ((ret == SECURITY_SERVER_API_SUCCESS) || (ret == SECURITY_SERVER_API_ERROR_PASSWORD_EXPIRED)) {\r
+               LOCK_SCREEN_TRACE_DBG("correct password!");\r
+               return EINA_TRUE;\r
+       } else {\r
+               LOCK_SCREEN_TRACE_DBG("incorrect password!");\r
+               return EINA_FALSE;\r
+       }\r
+}\r
+\r
+static lockscreen_password_type __password_verification_check_length(const char *str, int min, int max)\r
+{\r
+       int len = 0;\r
+\r
+       if (!str) {\r
+               return EMPTY_PASSWORD;\r
+       }\r
+\r
+       len = strlen(str);\r
+\r
+       LOCK_SCREEN_TRACE_DBG("%s() len : %d", __FUNCTION__, len);\r
+\r
+       if (len == 0) {\r
+               return EMPTY_PASSWORD;\r
+       }\r
+\r
+       if (len < min || len > max) {\r
+               return OVERLENGTH_PASSWORD;\r
+       }\r
+\r
+       return NORMAL_PASSWORD;\r
+}\r
+\r
+static void __password_verification_set_expired_password_by_mdm(void *data)\r
+{\r
+       lockscreen_password_policy *password_policy = (lockscreen_password_policy *)data;\r
+\r
+       if(!password_policy) {\r
+               LOCK_SCREEN_TRACE_DBG("lock_policy is NULL");\r
+               return;\r
+       }\r
+\r
+       if(mdm_get_service() == MDM_RESULT_SUCCESS) {\r
+               LOCK_SCREEN_TRACE_DBG("success to connect mdm server..!!");\r
+               if (mdm_enforce_password_change() == MDM_RESULT_SUCCESS) {\r
+                       LOCK_SCREEN_TRACE_DBG("success to call mdm_enforce_password_change..!!");\r
+               } else {\r
+                       LOCK_SCREEN_TRACE_DBG("[ERROR] failed to call mdm_enforce_password_change..!!");\r
+               }\r
+\r
+               if (mdm_set_password_status(MDM_PASSWORD_EXPIRED) == MDM_RESULT_SUCCESS) {\r
+                       LOCK_SCREEN_TRACE_DBG("success to set MDM_PASSWORD_EXPIRED..!!");\r
+               } else {\r
+                       LOCK_SCREEN_TRACE_DBG("[ERROR] failed to set MDM_PASSWORD_EXPIRED..!!");\r
+               }\r
+               mdm_release_service();\r
+       } else {\r
+               LOCK_SCREEN_TRACE_DBG("[ERROR] failed to connect mdm server");\r
+       }\r
+}\r
+\r
+static void __password_verification_recorver_password_by_mdm(void *data)\r
+{\r
+       lockscreen_password_policy *password_policy = (lockscreen_password_policy *)data;\r
+\r
+       if(!password_policy) {\r
+               LOCK_SCREEN_TRACE_DBG("lock_policy is NULL");\r
+               return;\r
+       }\r
+\r
+       if(mdm_get_service() == MDM_RESULT_SUCCESS) {\r
+               LOCK_SCREEN_TRACE_DBG("success to connect mdm server..!!");\r
+               mdm_data_t * lp_data = NULL;\r
+               mdm_password_policy_t *pwd_info = NULL;\r
+               lp_data = mdm_get_password_policy();\r
+               if (lp_data != NULL) {\r
+                       pwd_info = (mdm_password_policy_t *)lp_data->data;\r
+                       password_policy->mdm_quality = pwd_info->quality;\r
+                       LOCK_SCREEN_TRACE_DBG("mdm quality : %d", password_policy->mdm_quality);\r
+                       lp_data->mem_header.free_func(lp_data);\r
+               } else {\r
+                       LOCK_SCREEN_TRACE_DBG("set password policy fail");\r
+               }\r
+               if (password_policy->mdm_quality != MDM_PASSWORD_QUALITY_UNSPECIFIED) {\r
+                       if (mdm_set_password_status(MDM_PASSWORD_FAILED) == MDM_RESULT_SUCCESS) {\r
+                               LOCK_SCREEN_TRACE_DBG("success to set MDM_PASSWORD_FAILED..!!");\r
+                       } else {\r
+                               LOCK_SCREEN_TRACE_DBG("[ERROR] failed to set MDM_PASSWORD_FAILED..!!");\r
+                       }\r
+               }\r
+               mdm_release_service();\r
+       }else {\r
+               LOCK_SCREEN_TRACE_DBG("[ERROR] failed to connect mdm server");\r
+       }\r
+}\r
+\r
+void *password_verification_policy_create()\r
+{\r
+       lockscreen_password_policy *password_policy = NULL;\r
+       int ret = 0;\r
+       unsigned int cur_attempt = 0;\r
+       unsigned int max_attempt = 0;\r
+       unsigned int expire_sec = 0;\r
+\r
+       password_policy = (lockscreen_password_policy *) calloc(1, sizeof(lockscreen_password_policy));\r
+\r
+       if (!password_policy){\r
+               return NULL;\r
+       }\r
+\r
+       password_policy->mdm_quality = MDM_PASSWORD_QUALITY_UNSPECIFIED;\r
+\r
+       ret = security_server_is_pwd_valid(&cur_attempt, &max_attempt, &expire_sec);\r
+       LOCK_SCREEN_TRACE_DBG("policy status:%d, cur_attempt:%d, max_attempt:%d ", ret, cur_attempt, max_attempt);\r
+\r
+       if(ret == SECURITY_SERVER_API_ERROR_NO_PASSWORD) {\r
+               password_policy->current_attempt = cur_attempt;\r
+               password_policy->max_attempt = max_attempt;\r
+               password_policy->recoverable = EINA_FALSE;\r
+               password_policy->expire_sec = expire_sec;\r
+       }\r
+\r
+       return password_policy;\r
+}\r
+\r
+void password_verification_policy_destroy(void *data)\r
+{\r
+       lockscreen_password_policy *password_policy = (lockscreen_password_policy *)data;\r
+\r
+       if (!password_policy){\r
+               return;\r
+       }\r
+\r
+       free(password_policy);\r
+       password_policy = NULL;\r
+}\r
+\r
+void password_verification_verify(void *data, const char *password)\r
+{\r
+       lockscreen_password_type password_type = NORMAL_PASSWORD;\r
+       lockscreen_password_policy *password_policy = (lockscreen_password_policy *)data;\r
+\r
+       if(!password_policy) {\r
+               LOCK_SCREEN_TRACE_DBG("lock_policy is NULL");\r
+               return;\r
+       }\r
+       password_type = __password_verification_check_length(password, 4, 16);\r
+       switch(password_type){\r
+               case NORMAL_PASSWORD:\r
+                       if (__password_verification_check_phone_password(password_policy, password)) {\r
+                               if ( __password_verification_check_pw_expired(password_policy)) {\r
+                                       __password_verification_set_expired_password_by_mdm(password_policy);\r
+                               }\r
+                               LOCK_SCREEN_TRACE_DBG("password is right!!!!");\r
+                               elm_exit();\r
+                       } else {\r
+                               if (__password_verification_check_recovery (password_policy)) {\r
+                                       LOCK_SCREEN_TRACE_DBG("Recovery lock mode..!!");\r
+                                       __password_verification_recorver_password_by_mdm(password_policy);\r
+                               }\r
+                               if(password_policy->callback){\r
+                                       password_policy->callback("", password_policy->data);\r
+                               }\r
+                       }\r
+                       break;\r
+               case EMPTY_PASSWORD:\r
+                       password_policy->callback("empty", password_policy->data);\r
+                       break;\r
+               case OVERLENGTH_PASSWORD:\r
+                       password_policy->callback("overlength", password_policy->data);\r
+                       break;\r
+       }\r
+}\r
+\r
+void password_verification_callback_set(void *data, password_operation_cb callback, void *priv)\r
+{\r
+       lockscreen_password_policy *password_policy = (lockscreen_password_policy *)data;\r
+\r
+       if (!password_policy){\r
+               return;\r
+       }\r
+\r
+       password_policy->callback = callback;\r
+       password_policy->data = priv;\r
+}\r
diff --git a/src/password-verification.h b/src/password-verification.h
new file mode 100755 (executable)
index 0000000..8eec99d
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the License);\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *  http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an AS IS BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __PASSWORD_VERIFICATION_H__\r
+#define __PASSWORD_VERIFICATION_H__\r
+\r
+typedef void (*password_operation_cb) (const char *event, void *data);\r
+\r
+void *password_verification_policy_create();\r
+void password_verification_policy_destroy(void *data);\r
+void password_verification_verify(void *data, const char *password);\r
+void password_verification_callback_set(void *data, password_operation_cb callback, void *priv);\r
+\r
+#endif\r
diff --git a/src/simple-password.c b/src/simple-password.c
new file mode 100755 (executable)
index 0000000..e86bd34
--- /dev/null
@@ -0,0 +1,299 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the License);\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *  http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an AS IS BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include <vconf.h>\r
+\r
+#include "lockscreen.h"\r
+#include "util.h"\r
+#include "log.h"\r
+#include "password-verification.h"\r
+\r
+#define MAX_PASSWORD_NUM 4\r
+#define PASSWORD_ATTEMPTS_MAX_NUM  5\r
+#define VCONFKEY_SETAPPL_PASSWORD_ATTEMPTS_LEFT_INT   VCONFKEY_SETAPPL_PREFIX"/phone_lock_attempts_left"\r
+#define VCONFKEY_SETAPPL_PASSWORD_TIMESTAMP_STR       VCONFKEY_SETAPPL_PREFIX"/phone_lock_timestamp"\r
+#define PASSWORD_TIMESTAMP_STR_LENGTH 512\r
+#define PASSWORD_BLOCK_SECONDS        30\r
+\r
+static char simple_password[MAX_PASSWORD_NUM + 1] = {0};\r
+static int simple_password_length = 0;\r
+static Evas_Coord simple_pw_down_y = 0;\r
+\r
+static void __simple_password_password_show(struct appdata *ad)\r
+{\r
+       char buf1[50] = {0};\r
+       char buf2[50] = {0};\r
+       int i = 1;\r
+\r
+       for(i = 1; i <= simple_password_length; i++){\r
+               snprintf(buf1, sizeof(buf1), "show,password%d", i);\r
+               snprintf(buf2, sizeof(buf2), "password%d", i);\r
+               edje_object_signal_emit(_EDJ(ad->ly_simple_password), buf1, buf2);\r
+       }\r
+       for(i = MAX_PASSWORD_NUM; i > simple_password_length; i--){\r
+               snprintf(buf1, sizeof(buf1), "hide,password%d", i);\r
+               snprintf(buf2, sizeof(buf2), "password%d", i);\r
+               edje_object_signal_emit(_EDJ(ad->ly_simple_password), buf1, buf2);\r
+       }\r
+}\r
+\r
+static void __simple_password_keypad_process(void *data, Evas_Object *obj, const char *emission, const char *source)\r
+{\r
+       struct appdata *ad = data;\r
+\r
+       LOCK_SCREEN_TRACE_DBG("source = %s", source);\r
+       if (strcmp("SOS", source) == 0) {\r
+       } else if (strcmp("Backspace", source) == 0) {\r
+               if(simple_password_length <= 0){\r
+                       simple_password[0] = '\0';\r
+                       return;\r
+               }\r
+               simple_password_length--;\r
+               simple_password[simple_password_length] = '\0';\r
+       } else {\r
+               if(ad->is_disabled){\r
+                       return;\r
+               }\r
+               if(simple_password_length >= MAX_PASSWORD_NUM){\r
+                       return;\r
+               }else {\r
+                       simple_password[simple_password_length] = *source;\r
+                       simple_password_length++;\r
+               }\r
+\r
+               if(simple_password_length == MAX_PASSWORD_NUM){\r
+                       password_verification_verify(ad->h_password_policy, simple_password);\r
+               }\r
+       }\r
+\r
+       LOCK_SCREEN_TRACE_DBG("simple_password = %s, simple_password_length = %d", simple_password, simple_password_length);\r
+       __simple_password_password_show(ad);\r
+}\r
+\r
+static void __simple_password_layout_destroy(void *data, Evas_Object *obj, const char *emission, const char *source)\r
+{\r
+       struct appdata *ad = data;\r
+       int i = 0;\r
+       LOCK_SCREEN_TRACE_DBG("__simple_password_layout_destroy");\r
+\r
+       for(i = 0; i <= MAX_PASSWORD_NUM; i++){\r
+               simple_password[i] = 0;\r
+       }\r
+       simple_password_length = 0;\r
+       if (ad->password_timer) {\r
+               ecore_timer_del(ad->password_timer);\r
+               ad->password_timer = NULL;\r
+       }\r
+       if(ad->ly_simple_password){\r
+               evas_object_del(ad->ly_simple_password);\r
+               ad->ly_simple_password = NULL;\r
+       }\r
+       password_verification_policy_destroy(ad->h_password_policy);\r
+       lockscreen_info_show(ad);\r
+}\r
+\r
+static void __simple_password_mouse_down_cb(void *data, Evas * evas, Evas_Object * obj,\r
+                           void *event_info)\r
+{\r
+       Evas_Event_Mouse_Down *ei = event_info;\r
+\r
+       simple_pw_down_y = ei->output.y;\r
+\r
+       LOCK_SCREEN_TRACE_DBG("simple_pw_down_y = %d", simple_pw_down_y);\r
+}\r
+\r
+static void __simple_password_mouse_up_cb(void *data, Evas * evas, Evas_Object * obj,\r
+                         void *event_info)\r
+{\r
+       struct appdata *ad = data;\r
+       Evas_Event_Mouse_Down *ei = event_info;\r
+\r
+       Evas_Coord pos_up_y = ei->output.y;\r
+\r
+       if((pos_up_y - simple_pw_down_y) > _X(300)){\r
+               edje_object_signal_emit(_EDJ(ad->ly_simple_password), "hide,numberkeyboard", "sw.keypad.number");\r
+               edje_object_signal_callback_add(_EDJ(ad->ly_simple_password), "hide,simplepw", "event", __simple_password_layout_destroy, ad);\r
+       }\r
+}\r
+\r
+static void __simple_password_mouse_move_cb(void *data, Evas * evas, Evas_Object * obj,\r
+                           void *event_info)\r
+{\r
+       LOCK_SCREEN_TRACE_DBG("__simple_password_mouse_move_cb");\r
+}\r
+\r
+void __simple_password_check_result(void *data)\r
+{\r
+       struct appdata *ad = (struct appdata *) data;\r
+\r
+       int value = -1;\r
+\r
+       vconf_get_int(VCONFKEY_SETAPPL_PASSWORD_ATTEMPTS_LEFT_INT, &value);\r
+       value--;\r
+\r
+       if (value > 0 && value <= PASSWORD_ATTEMPTS_MAX_NUM) {\r
+               char temp_str[200] = {0};\r
+               char temp_left[50] = {0};\r
+\r
+               vconf_set_int(VCONFKEY_SETAPPL_PASSWORD_ATTEMPTS_LEFT_INT,\r
+                             value);\r
+               if(value == 1)\r
+               {\r
+                       snprintf(temp_left, sizeof(temp_left), _L("1 attempt left."));\r
+               }\r
+               else\r
+               {\r
+                       snprintf(temp_left, sizeof(temp_left), _L("%d attempts left."), value);\r
+               }\r
+               snprintf(temp_str, sizeof(temp_str), "%s, %s", _L("Wrong password"), temp_left);\r
+               edje_object_part_text_set(_EDJ(ad->ly_simple_password), "txt.result", temp_str);\r
+       } else if (value == 0) {\r
+               time_t cur_time = time(NULL);\r
+               char cur_timestamp[64] = {0};\r
+               char temp_str[512] = {0};\r
+\r
+               snprintf(cur_timestamp, sizeof(cur_timestamp), "%ld", cur_time);\r
+               vconf_set_str(VCONFKEY_SETAPPL_PASSWORD_TIMESTAMP_STR, cur_timestamp);\r
+               vconf_set_int(VCONFKEY_SETAPPL_PASSWORD_ATTEMPTS_LEFT_INT, value);\r
+               ad->block_seconds = PASSWORD_BLOCK_SECONDS;\r
+\r
+               snprintf(temp_str, sizeof(temp_str), _L("Input password again after %d seconds."), ad->block_seconds);\r
+               edje_object_part_text_set(_EDJ(ad->ly_simple_password), "txt.result", temp_str);\r
+       }\r
+}\r
+\r
+static void __simple_password_check_result_cb (const char *event, void *data)\r
+{\r
+       __simple_password_check_result(data);\r
+}\r
+\r
+static void __simple_password_results_update(void *data)\r
+{\r
+       int value = -1;\r
+       int ret = 0;\r
+\r
+       struct appdata *ad = (struct appdata *) data;\r
+\r
+       if (ad == NULL) {\r
+               return;\r
+       }\r
+       LOCK_SCREEN_TRACE_DBG("%s", __FUNCTION__);\r
+\r
+       ret =\r
+           vconf_get_int(VCONFKEY_SETAPPL_PASSWORD_ATTEMPTS_LEFT_INT,\r
+                         &value);\r
+\r
+       if (ret != 0) {\r
+               return;\r
+       }\r
+\r
+       if (value == 0) {\r
+               char timestamp_str[512] = {0};\r
+               char *temp = NULL;\r
+               int length = 0;\r
+               int temp_length = 0;\r
+               temp = vconf_get_str(VCONFKEY_SETAPPL_PASSWORD_TIMESTAMP_STR);\r
+               temp_length = strlen(temp);\r
+               length = (temp_length <= PASSWORD_TIMESTAMP_STR_LENGTH) ? temp_length : PASSWORD_TIMESTAMP_STR_LENGTH;\r
+               strncpy(timestamp_str, temp, length);\r
+               timestamp_str[length] = '\0';\r
+               if ((strcmp(timestamp_str, "") != 0)\r
+                   || (strlen(timestamp_str) != 0)) {\r
+                       time_t cur_time = time(NULL);\r
+                       time_t last_lock_time;\r
+                       sscanf(timestamp_str, "%ld", &last_lock_time);\r
+\r
+                       if ((cur_time - last_lock_time) < PASSWORD_BLOCK_SECONDS) {\r
+                               ad->block_seconds = PASSWORD_BLOCK_SECONDS - (cur_time - last_lock_time);\r
+                               LOCK_SCREEN_TRACE_DBG("ad->block_seconds = %d", ad->block_seconds);\r
+                               ad->is_disabled = EINA_TRUE;\r
+                               char temp_str[512] = {0};\r
+                               snprintf(temp_str, sizeof(temp_str), _L("Input password again after %d seconds."), ad->block_seconds);\r
+                               edje_object_part_text_set(_EDJ(ad->ly_simple_password), "txt.result", temp_str);\r
+                       } else {\r
+                               ad->is_disabled = EINA_FALSE;\r
+                               vconf_set_int(VCONFKEY_SETAPPL_PASSWORD_ATTEMPTS_LEFT_INT, PASSWORD_ATTEMPTS_MAX_NUM);\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
+static Eina_Bool __simple_password_results_update_cb(void *data)\r
+{\r
+       __simple_password_results_update(data);\r
+       return EINA_TRUE;\r
+}\r
+\r
+static void __simple_password_check_vconf_value(void *data)\r
+{\r
+       int phone_lock_value = -1;\r
+       struct appdata *ad = (struct appdata *) data;\r
+\r
+       if (ad == NULL) {\r
+               return;\r
+       }\r
+       LOCK_SCREEN_TRACE_DBG("%s", __FUNCTION__);\r
+\r
+       vconf_get_int(VCONFKEY_SETAPPL_PASSWORD_ATTEMPTS_LEFT_INT, &phone_lock_value);\r
+\r
+       if (phone_lock_value == 0) {\r
+               if (ad->password_timer) {\r
+                       return;\r
+               }\r
+               ad->password_timer = ecore_timer_add(1, (Ecore_Task_Cb)__simple_password_results_update_cb, ad);\r
+       } else {\r
+               if (ad->password_timer) {\r
+                       ecore_timer_del(ad->password_timer);\r
+                       ad->password_timer = NULL;\r
+               }\r
+               ad->is_disabled = EINA_FALSE;\r
+       }\r
+}\r
+\r
+static void __simple_password_check_vconf_value_cb(keynode_t * key, void *data)\r
+{\r
+       __simple_password_check_vconf_value(data);\r
+}\r
+\r
+void simple_password_layout_create(void *data)\r
+{\r
+       struct appdata *ad = (struct appdata *)data;\r
+       if(ad == NULL){\r
+               return;\r
+       }\r
+\r
+       Evas_Object *keypad_layout = NULL;\r
+\r
+       ad->h_password_policy = password_verification_policy_create();\r
+       password_verification_callback_set(ad->h_password_policy, __simple_password_check_result_cb, ad);\r
+       lockscreen_info_hide(ad);\r
+       ad->ly_simple_password = elm_layout_add(ad->ly_main);\r
+       elm_layout_file_set(ad->ly_simple_password, EDJEFILE, "lock-simple-password");\r
+       elm_object_part_content_set(ad->ly_main, "sw.phone-lock", ad->ly_simple_password);\r
+       edje_object_part_text_set(_EDJ(ad->ly_simple_password), "txt.title", _S("IDS_COM_BODY_ENTER_PASSWORD"));\r
+\r
+       keypad_layout = elm_layout_add(ad->ly_simple_password);\r
+       elm_layout_file_set(keypad_layout, EDJEFILE, "lock-keypad-number");\r
+       elm_object_part_content_set(ad->ly_simple_password, "sw.keypad.number", keypad_layout);\r
+       edje_object_signal_emit(_EDJ(ad->ly_simple_password), "show,numberkeyboard", "sw.keypad.number");\r
+       edje_object_signal_callback_add(_EDJ(keypad_layout), "keypad_down_clicked", "*", __simple_password_keypad_process, ad);\r
+       evas_object_event_callback_add(ad->ly_simple_password, EVAS_CALLBACK_MOUSE_DOWN, __simple_password_mouse_down_cb, ad);\r
+       evas_object_event_callback_add(ad->ly_simple_password, EVAS_CALLBACK_MOUSE_MOVE, __simple_password_mouse_move_cb, ad);\r
+       evas_object_event_callback_add(ad->ly_simple_password, EVAS_CALLBACK_MOUSE_UP, __simple_password_mouse_up_cb, ad);\r
+       evas_object_show(keypad_layout);\r
+       vconf_notify_key_changed(VCONFKEY_SETAPPL_PASSWORD_ATTEMPTS_LEFT_INT, __simple_password_check_vconf_value_cb, ad);\r
+       __simple_password_check_vconf_value(ad);\r
+}\r
diff --git a/src/simple-password.h b/src/simple-password.h
new file mode 100755 (executable)
index 0000000..e1de5fa
--- /dev/null
@@ -0,0 +1,22 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the License);\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *  http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an AS IS BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#ifndef __SIMPLE_PASSWORD_H__\r
+#define __SIMPLE_PASSWORD_H__\r
+\r
+void simple_password_layout_create(void *data);\r
+\r
+#endif\r
diff --git a/src/util.c b/src/util.c
new file mode 100755 (executable)
index 0000000..4e4ab81
--- /dev/null
@@ -0,0 +1,332 @@
+/*
+ * 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 <Ecore_X.h>
+#include <Elementary.h>
+#include <utilX.h>
+#include <vconf.h>
+#include <vconf-keys.h>
+#include <ail.h>
+
+#include "util.h"
+#include "info.h"
+#include "bg.h"
+#include "noti.h"
+
+#define DEFAULT_BG_PATH     "/opt/share/settings/Wallpapers/Home_default.jpg"
+
+static Evas_Coord pos_down_y = 0;
+
+void _set_win_property(Evas_Object * win)
+{
+       Ecore_X_Window xwin;
+
+       if (win == NULL) {
+               LOGD("[Error:%s] Invalid argument: win is NULL", __func__);
+               return;
+       }
+       xwin = elm_win_xwindow_get(win);
+       if (xwin == 0) {
+               LOGD("[Error:%s] Cannot get xwindow", __func__);
+               return;
+       }
+
+       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_NORMAL);
+
+       utilx_set_window_opaque_state(ecore_x_display_get(), xwin, UTILX_OPAQUE_STATE_ON);
+}
+
+Evas_Object *_add_layout(Evas_Object *parent, const char *file, const char *group)
+{
+       if (parent == NULL)
+               return NULL;
+
+       Evas_Object *ly;
+       int r;
+
+       ly = elm_layout_add(parent);
+       if (ly == NULL)
+               return NULL;
+
+       r = elm_layout_file_set(ly, file, group);
+       if (!r) {
+               evas_object_del(ly);
+               return NULL;
+       }
+       evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+
+       evas_object_show(ly);
+
+       return ly;
+}
+
+Evas_Object *_make_top_layout(struct appdata *ad)
+{
+       if (ad == NULL)
+               return NULL;
+
+       Evas_Object *eo = NULL;
+       Evas_Object *conform = NULL;
+
+       conform = elm_conformant_add(ad->win);
+       if(conform == NULL) {
+               return NULL;
+       }
+       elm_object_style_set(conform, "indicator_overlap");
+
+       eo = _add_layout(conform, EDJEFILE, "lock-main");
+       if (eo == NULL)
+               return NULL;
+
+       evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND,
+                                                EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(ad->win, conform);
+       elm_object_content_set(conform, eo);
+       evas_object_show(conform);
+       evas_object_resize(eo, ad->win_w, ad->win_h);
+
+       return eo;
+}
+
+Evas_Object *_make_slider(Evas_Object *parent)
+{
+       Evas_Object *layout = NULL;
+
+       if (parent == NULL) {
+               LOCK_SCREEN_TRACE_DBG("The parent of slider is null");
+               return NULL;
+       }
+
+       layout = _add_layout(parent, EDJEFILE, "lock-slider");
+       if (layout == NULL) {
+               return NULL;
+       }
+
+       return layout;
+}
+
+Evas_Object *_get_bg_image(Evas_Object *parent)
+{
+       Evas_Object *bg = NULL;
+       char *file = NULL;
+       Eina_Bool ret = EINA_FALSE;
+
+       if (parent == NULL)
+               return NULL;
+
+       if ((file = vconf_get_str(VCONFKEY_IDLE_LOCK_BGSET)) ==  NULL) {
+               file = vconf_get_str(VCONFKEY_BGSET);
+       }
+
+       bg = elm_icon_add(parent);
+       if (bg == NULL)
+               return NULL;
+       elm_icon_aspect_fixed_set(bg, EINA_FALSE);
+
+       if (file) {
+               ret = elm_icon_file_set(bg, file, NULL);
+               if (ret == EINA_FALSE) {
+                       elm_icon_file_set(bg, DEFAULT_BG_PATH, NULL);
+               }
+               free(file);
+       } else {
+               elm_icon_file_set(bg, DEFAULT_BG_PATH, NULL);
+       }
+       return bg;
+}
+
+void lockscreen_info_show(struct appdata *ad)
+{
+       if(ad == NULL){
+               return;
+       }
+
+       edje_object_signal_emit(_EDJ(ad->ly_main), "show,text.area", "text.area");
+       edje_object_signal_emit(_EDJ(ad->ly_main), "show,sw.noti", "sw.noti");
+       edje_object_signal_emit(_EDJ(ad->ly_main), "show,sim.state", "sim.state");
+       edje_object_signal_emit(_EDJ(ad->ly_main), "show,rect.info", "rect.info");
+       if(ad->slider != NULL) {
+               evas_object_show(ad->slider);
+       }
+}
+
+void lockscreen_info_hide(struct appdata *ad)
+{
+       if(ad == NULL){
+               return;
+       }
+
+       edje_object_signal_emit(_EDJ(ad->ly_main), "hide,text.area", "text.area");
+       edje_object_signal_emit(_EDJ(ad->ly_main), "hide,sw.noti", "sw.noti");
+       edje_object_signal_emit(_EDJ(ad->ly_main), "hide,sim.state", "sim.state");
+       edje_object_signal_emit(_EDJ(ad->ly_main), "hide,rect.info", "rect.info");
+       if(ad->slider != NULL) {
+               evas_object_hide(ad->slider);
+       }
+}
+
+static void _set_sim_state(void *data)
+{
+       struct appdata *ad = data;
+       if (ad == NULL)
+               return;
+
+       int state = 0;
+       int ret = 0;
+       char *buf = NULL;
+
+       int service_type = VCONFKEY_TELEPHONY_SVCTYPE_NONE;
+
+       if(vconf_get_int(VCONFKEY_TELEPHONY_SVCTYPE, &service_type) != 0) {
+               LOGD("fail to get VCONFKEY_TELEPHONY_SVCTYPE");
+       }
+
+       ret = (vconf_get_int(VCONFKEY_TELEPHONY_SPN_DISP_CONDITION, &state));
+       if (ret == 0) {
+               LOGD("[%s:%d] VCONFKEY(%s) = %d", __func__, __LINE__, VCONFKEY_TELEPHONY_SPN_DISP_CONDITION, state);
+               if (state != VCONFKEY_TELEPHONY_DISP_INVALID
+                       && service_type > VCONFKEY_TELEPHONY_SVCTYPE_SEARCH) {
+                       if (state & VCONFKEY_TELEPHONY_DISP_SPN) {
+                               buf = vconf_get_str(VCONFKEY_TELEPHONY_SPN_NAME);
+                               edje_object_part_text_set(_EDJ(ad->ly_main), "sim.state", buf);
+                       }
+
+                       if (state & VCONFKEY_TELEPHONY_DISP_PLMN) {
+                               buf = vconf_get_str(VCONFKEY_TELEPHONY_NWNAME);
+                               edje_object_part_text_set(_EDJ(ad->ly_main), "sim.state", buf);
+                       }
+               } else {
+                       edje_object_part_text_set(_EDJ(ad->ly_main), "sim.state", "");
+               }
+       }
+}
+
+static void _app_exit(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+       struct appdata *ad = data;
+       _app_terminate(ad);
+}
+
+static Eina_Bool _init_widget_cb(void *data)
+{
+       struct appdata *ad = data;
+       LOGD("[ == %s == ]", __func__);
+       if (ad == NULL)
+               return ECORE_CALLBACK_CANCEL;
+
+       ad->slider = _make_slider(ad->ly_main);
+       evas_object_resize(ad->slider, ad->win_w, SLIDER_RATIO_H * ad->win_h);
+       evas_object_move(ad->slider, 0, SLIDER_RATIO_Y * ad->win_h);
+       evas_object_show(ad->slider);
+       evas_object_geometry_get(
+                       edje_object_part_object_get(_EDJ(ad->slider), "lock.wrapper.image.l"),
+                       &ad->slider_rel1.x, &ad->slider_rel1.y, &ad->slider_rel1.w,
+                       &ad->slider_rel1.h);
+       evas_object_geometry_get(
+                       edje_object_part_object_get(_EDJ(ad->slider), "lock.wrapper.image.r"),
+                       &ad->slider_rel2.x, &ad->slider_rel2.y, &ad->slider_rel2.w,
+                       &ad->slider_rel2.h);
+
+       _set_sim_state(ad);
+
+       ad->info = elm_layout_add(ad->win);
+       elm_layout_file_set(ad->info, EDJEFILE, "lock-info");
+       evas_object_show(ad->info);
+       elm_object_part_content_set(ad->ly_main, "rect.info", ad->info);
+       _set_info(ad);
+
+       int state = 0;
+       vconf_get_bool(VCONFKEY_LOCKSCREEN_EVENT_NOTIFICATION_DISPLAY, &state);
+       if(state){
+               noti_process(ad);
+       }
+
+       evas_object_event_callback_add(ad->event_bg, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb_s, ad);
+       evas_object_event_callback_add(ad->event_bg, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb_s, ad);
+       evas_object_event_callback_add(ad->event_bg, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move_cb_s, ad);
+
+       evas_object_event_callback_add(ad->slider, EVAS_CALLBACK_MOUSE_DOWN, _slider_down_cb, ad);
+       evas_object_event_callback_add(ad->slider, EVAS_CALLBACK_MOUSE_UP, _slider_up_cb, ad);
+       evas_object_event_callback_add(ad->slider, EVAS_CALLBACK_MOUSE_MOVE, _slider_move_cb, ad);
+
+       edje_object_signal_callback_add(_EDJ(ad->ly_main), "exit,app", "event", _app_exit, ad);
+
+       vconf_set_int(VCONFKEY_IDLE_LOCK_STATE, VCONFKEY_IDLE_LOCK);
+
+       return ECORE_CALLBACK_CANCEL;
+}
+
+int _app_create(struct appdata *ad)
+{
+       if (ad == NULL)
+               return -1;
+       LOGD("[ == %s == ]", __func__);
+
+       ecore_x_icccm_name_class_set(elm_win_xwindow_get(ad->win), "LOCK_SCREEN", "LOCK_SCREEN");
+       evas_object_show(ad->win);
+       _set_win_property(ad->win);
+
+       elm_win_indicator_mode_set(ad->win, ELM_WIN_INDICATOR_SHOW);
+
+       ad->ly_main = _make_top_layout(ad);
+       if (ad->ly_main == NULL)
+               return -1;
+       ad->event_bg = _get_bg_image(ad->ly_main);
+       if (ad->event_bg == NULL)
+               return -1;
+       elm_object_part_content_set(ad->ly_main, "sw.bg", ad->event_bg);
+
+       return 0;
+}
+
+int _app_reset(struct appdata *ad)
+{
+       if (ad == NULL)
+               return -1;
+
+       static int initted = 0;
+       if(initted == 0) {
+               ecore_idler_add(_init_widget_cb, ad);
+               initted = 1;
+       }
+
+       return 0;
+}
+
+int _app_resume(struct appdata *ad)
+{
+       if (ad == NULL)
+               return -1;
+
+       return 0;
+}
+
+int _app_terminate(struct appdata *ad)
+{
+       vconf_set_int(VCONFKEY_IDLE_LOCK_STATE, VCONFKEY_IDLE_UNLOCK);
+
+       if (ad == NULL) {
+               LOGD("[_app_terminate] Invalid argument : struct appdata is NULL\n");
+               return -1;
+       }
+
+       LOGD("[%s] app termiante", __func__);
+       elm_exit();
+
+       return 0;
+}
diff --git a/src/util.h b/src/util.h
new file mode 100755 (executable)
index 0000000..fdc0d31
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * 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 __UTIL_H__
+#define __UTIL_H__
+
+#include "lockscreen.h"
+
+void _set_win_property(Evas_Object *win);
+
+Evas_Object *_add_layout(Evas_Object *parent, const char *file, const char *group);
+Evas_Object *_make_top_layout(struct appdata *ad);
+Evas_Object *_get_bg_image(Evas_Object *parent);
+void lockscreen_info_show(struct appdata *ad);
+void lockscreen_info_hide(struct appdata *ad);
+
+int _app_create(struct appdata *ad);
+int _app_reset(struct appdata *ad);
+int _app_terminate(struct appdata *ad);
+
+#endif