--- /dev/null
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(phone-lock C)
+
+SET(VENDOR "tizen")
+SET(PACKAGE ${PROJECT_NAME})
+SET(PKGNAME "org.${VENDOR}.${PACKAGE}")
+#SET(DEBPKGNAME "deb.${PKGNAME}")
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(BINDIR "${PREFIX}/bin")
+SET(RESDIR "${PREFIX}/res")
+SET(DATADIR "${PREFIX}/data")
+SET(LOCALEDIR "${RESDIR}/locale")
+SET(ICONDIR "${RESDIR}/icons/default/small")
+SET(EDJDIR "${RESDIR}/edje")
+SET(IMAGEDIR "${RESDIR}/images")
+
+INSTALL(DIRECTORY DESTINATION ${DATADIR})
+
+SET(PHONE_LOCK_MAIN phone-lock-main)
+SET(PHONE_LOCK_COMMON phone-lock-common)
+SET(PHONE_LOCK_UG_EFL phone-lock-ug-efl)
+SET(PHONE_LOCK_UG_EFL_UG ug-phone-lock-efl)
+
+SET(CMAKE_BINARY_COMMON_DIR "${CMAKE_BINARY_DIR}/${PHONE_LOCK_COMMON}")
+
+IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+ SET(CMAKE_BUILD_TYPE "Release")
+ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
+
+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("-DICONDIR=\"${ICONDIR}\"")
+ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"")
+ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"")
+
+# i18n
+ADD_SUBDIRECTORY(po)
+
+ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${PHONE_LOCK_COMMON})
+ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${PHONE_LOCK_MAIN})
+ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${PHONE_LOCK_UG_EFL})
+
+ADD_SUBDIRECTORY(data)
+
--- /dev/null
+1. make the build directory
+
+ ex)
+
+ $ mkdir build
+
+
+2. change the working directory to the build directory
+
+ ex)
+
+ $ cd build
+
+
+3. run 'cmake'
+
+ $ cmake ${SOURCE_DIR} -DCMAKE_INSTALL_PREFIX=/opt/apps/${PKGNAME}
+
+ ex)
+
+ $ cmake .. -DCMAKE_INSTALL_PREFIX=/opt/apps/${PKGNAME}
+
+ or
+
+ $ cmake ..
+
+
+4. make & make install
+
+ ex)
+
+ $ make -j 2 && make install
+
--- /dev/null
+Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
\ No newline at end of file
--- /dev/null
+# compile edj
+ADD_CUSTOM_TARGET(phone-lock.edj
+ COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/images
+ ${CMAKE_CURRENT_SOURCE_DIR}/phone-lock.edc
+ ${CMAKE_CURRENT_BINARY_DIR}/phone-lock.edj
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/phone-lock.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} phone-lock.edj)
+
+ADD_CUSTOM_TARGET(phone-lock-view.edj
+ COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/images
+ ${CMAKE_CURRENT_SOURCE_DIR}/phone-lock-view.edc
+ ${CMAKE_CURRENT_BINARY_DIR}/phone-lock-view.edj
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/phone-lock-view.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} phone-lock-view.edj)
+
+ADD_CUSTOM_TARGET(phone-lock-view-entry.edj
+ COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/images
+ ${CMAKE_CURRENT_SOURCE_DIR}/phone-lock-view-entry.edc
+ ${CMAKE_CURRENT_BINARY_DIR}/phone-lock-view-entry.edj
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/phone-lock-view-entry.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} phone-lock-view-entry.edj)
+
+# install edj
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/phone-lock.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/phone-lock-view.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/phone-lock-view-entry.edj DESTINATION ${EDJDIR})
+
+# install desktop file & icon
+CONFIGURE_FILE(${PKGNAME}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${PKGNAME}.desktop)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PKGNAME}.desktop DESTINATION /opt/share/applications)
+#INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/icon_${PROJECT_NAME}.png DESTINATION ${ICONDIR})
+
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/images/ DESTINATION ${IMAGEDIR})
\ No newline at end of file
--- /dev/null
+Name=@PROJECT_NAME@
+Exec=@BINDIR@/@PROJECT_NAME@
+Type=Application
+Nodisplay=True
+
+X-TIZEN-TaskManage=False
+X-TIZEN-Multiple=False
+X-TIZEN-Removable=False
+
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+collections {
+ group { name: "elm/entry/base/default";
+ data.item: "default_font_size" "24";
+ data.item: "min_font_size" "8";
+ data.item: "max_font_size" "60";
+ styles
+ {
+ style { name: "entry_textblock_style";
+ base: "font=SLP:style=Roman font_size=24 color=#ffffff wrap=mixed";
+ 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_textblock_disabled_style";
+ base: "font=SLP:style=Roman font_size=24 color=#00000080 wrap=mixed";
+ 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: 1;
+ 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;
+ fixed: 1 0;
+ text {
+ style: "entry_textblock_style";
+ min: 0 1;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ text {
+ style: "entry_textblock_disabled_style";
+ min: 0 1;
+ }
+ }
+ }
+ }
+ 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-charwrap/default";
+ data.item: "default_font_size" "24";
+ data.item: "min_font_size" "8";
+ data.item: "max_font_size" "60";
+ styles
+ {
+ style { name: "entry_textblock_char_wrap_style";
+ base: "font=SLP:style=Roman font_size=24 color=#000000 wrap=char";
+ 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_textblock_char_wrap_disabled_style";
+ base: "font=SLP:style=Roman font_size=24 color=#00000080 wrap=char";
+ 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: 1;
+ 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;
+ fixed: 1 0;
+ text {
+ style: "entry_textblock_char_wrap_style";
+ min: 0 1;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ text {
+ style: "entry_textblock_char_wrap_disabled_style";
+ min: 0 1;
+ }
+ }
+ }
+ }
+ 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-nowrap/default";
+ 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: EDITABLE;
+ select_mode: BLOCK_HANDLE;
+ multiline: 1;
+ 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_textblock_style";
+ min: 1 1;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ text {
+ style: "entry_textblock_disabled_style";
+ min: 0 1;
+ }
+ }
+ }
+/*
+ part { name: "sel";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 1.0 1.0;
+ max: 16 16;
+ aspect: 1.0 1.0;
+ color: 255 0 0 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ color: 255 0 0 50;
+ }
+ }
+ */
+ }
+ 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";
+ }
+/*
+ program { name: "selmode0";
+ signal: "elm,state,select,on";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "sel";
+ }
+ program { name: "selmode1";
+ signal: "elm,state,select,off";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "sel";
+ }
+ */
+ }
+ }
+
+ group { name: "elm/entry/base/editfield";
+ alias: "elm/entry/base/editfield/default";
+ alias: "elm/entry/base/editfield/lighting";
+ alias: "elm/entry/base/editfield/multiline";
+ alias: "elm/entry/base/editfield/multiline/default";
+ alias: "elm/entry/base/editfield/multiline/lighting";
+
+ data.item: "default_font_size" "24";
+ data.item: "min_font_size" "8";
+ data.item: "max_font_size" "60";
+
+ styles
+ {
+ style { name: "editfield_textblock_style";
+ base: "font=SLP:style=Roman font_size=32 color=#000000 wrap=mixed";
+ 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: "editfield_textblock_disabled_style";
+ base: "font=SLP:style=Roman font_size=32 color=#00000080 wrap=mixed linesize=44";
+ 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: 1;
+ 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;
+ fixed: 1 0;
+ text {
+ style: "editfield_textblock_style";
+ min: 0 1;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ text {
+ style: "editfield_textblock_disabled_style";
+ min: 0 1;
+ }
+ }
+ }
+ }
+ 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-charwrap/editfield";
+ alias: "elm/entry/base/editfield/default/char_wrap";
+ alias: "elm/entry/base/editfield/lighting/char_wrap";
+ alias: "elm/entry/base/editfield/multiline/char_wrap";
+ alias: "elm/entry/base/editfield/multiline/default/char_wrap";
+ alias: "elm/entry/base/editfield/multiline/lighting/char_wrap";
+
+ data.item: "default_font_size" "24";
+ data.item: "min_font_size" "8";
+ data.item: "max_font_size" "60";
+
+ styles
+ {
+ style { name: "editfield_textblock_char_wrap_style";
+ base: "font=SLP:style=Roman font_size=32 color=#000000 wrap=char";
+ 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: "editfield_textblock_char_wrap_disabled_style";
+ base: "font=SLP:style=Roman font_size=32 color=#00000080 wrap=char linesize=44";
+ 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: 1;
+ 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;
+ fixed: 1 0;
+ text {
+ style: "editfield_textblock_char_wrap_style";
+ min: 0 1;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ text {
+ style: "editfield_textblock_char_wrap_disabled_style";
+ min: 0 1;
+ }
+ }
+ }
+ }
+ 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-single/editfield";
+ alias: "elm/entry/base-single/editfield/default";
+ alias: "elm/entry/base-single/editfield/lighting";
+ alias: "elm/entry/base-single/editfield/singleline";
+ alias: "elm/entry/base-single/editfield/singleline/default";
+ alias: "elm/entry/base-single/editfield/singleline/lighting";
+
+ data.item: "default_font_size" "24";
+ data.item: "min_font_size" "8";
+ data.item: "max_font_size" "60";
+
+ styles
+ {
+ style { name: "editfield_single_textblock_style";
+ base: "font=SLP:style=Roman font_size=32 color=#000000 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: "editfield_single_textblock_disabled_style";
+ base: "font=SLP:style=Roman font_size=32 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: "editfield_single_textblock_style";
+ min: 1 1;
+ max: 0 1;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ text {
+ style: "editfield_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-nowrap/default";
+ 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: EDITABLE;
+ select_mode: BLOCK_HANDLE;
+ multiline: 1;
+ 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_textblock_style";
+ min: 1 1;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ text {
+ style: "entry_textblock_disabled_style";
+ min: 0 1;
+ }
+ }
+ }
+/*
+ part { name: "sel";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ align: 1.0 1.0;
+ max: 16 16;
+ aspect: 1.0 1.0;
+ color: 255 0 0 0;
+ }
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ color: 255 0 0 50;
+ }
+ }
+ */
+ }
+ 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";
+ }
+/*
+ program { name: "selmode0";
+ signal: "elm,state,select,on";
+ source: "elm";
+ action: STATE_SET "visible" 0.0;
+ target: "sel";
+ }
+ program { name: "selmode1";
+ signal: "elm,state,select,off";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "sel";
+ }
+ */
+
+ }
+ }
+
+ 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 font_size=40 color=#ffffffff 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=Roman font_size=24 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-single-noedit/default";
+ 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: PLAIN;
+ select_mode: BLOCK_HANDLE;
+ multiline: 0;
+ source: "elm/entry/selection/default";
+ source2: "elm/entry/selection/block_handle";
+ source3: "elm/entry/selection/block_handle_top";
+ 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-noedit/default";
+ 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: PLAIN;
+ select_mode: BLOCK_HANDLE;
+ multiline: 1;
+ source: "elm/entry/selection/default";
+ source2: "elm/entry/selection/block_handle";
+ source3: "elm/entry/selection/block_handle_top";
+ source5: "elm/entry/anchor/default";
+ description { state: "default" 0.0;
+ fixed: 1 0;
+ text {
+ style: "entry_textblock_style";
+ min: 0 1;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ text {
+ style: "entry_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-noedit-charwrap/default";
+ 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: PLAIN;
+ select_mode: BLOCK_HANDLE;
+ multiline: 1;
+ source: "elm/entry/selection/default";
+ source2: "elm/entry/selection/block_handle";
+ source3: "elm/entry/selection/block_handle_top";
+ source5: "elm/entry/anchor/default";
+ description { state: "default" 0.0;
+ fixed: 1 0;
+ text {
+ style: "entry_textblock_style_charwrap";
+ min: 0 1;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ text {
+ style: "entry_textblock_disabled_style_charwrap";
+ }
+ }
+ }
+ }
+ 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-nowrap-noedit/default";
+ 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: PLAIN;
+ select_mode: BLOCK_HANDLE;
+ multiline: 1;
+ source: "elm/entry/selection/default";
+ source2: "elm/entry/selection/block_handle";
+ source3: "elm/entry/selection/block_handle_top";
+ source5: "elm/entry/anchor/default";
+ description { state: "default" 0.0;
+ text {
+ style: "entry_textblock_style";
+ min: 1 1;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ text {
+ style: "entry_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/pwlock_alpha_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 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/popup";
+ 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_popup_style";
+ repch: "*";
+ min: 1 1;
+ max: 0 1;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ text {
+ style: "entry_single_textblock_disabled_popup_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: 229 134 22 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";
+ images {
+ }
+ 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";
+ images {
+ }
+ 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/selection/block_bar";
+ images {
+ }
+ parts {
+ part { name: "bar_bg";
+ scale: 1;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ visible: 0;
+ image {
+ border: 0 0 0 0;
+ }
+ image.middle: SOLID;
+ fill.smooth: 0;
+ }
+ }
+ }
+ }
+
+
+
+ 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;
+ }
+ }
+ }
+ }
+
+ group { name: "elm/entry/preedit/default";
+ parts {
+ part { name: "bg";
+ type: RECT;
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ color: 128 128 128 255;
+ }
+ }
+ }
+ }
+
+
+#define MAGNIFIER_HEIGHT 114
+#define MAGNIFIER_SCALE 1.2
+
+ group { name: "elm/entry/magnifier/fill-width";
+ data.item: "height" MAGNIFIER_HEIGHT;
+ data.item: "scale" MAGNIFIER_SCALE;
+ images {
+ }
+ parts {
+ part { name: "bg";
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ align: 0.5 0.0;
+ visible: 0;
+ rel1 { offset: -20 -10; }
+ rel2 { offset: 22 15; }
+ image {
+ border: 25 25 35 25;
+ }
+ image.middle: SOLID;
+ fill.smooth: 0;
+ }
+ }
+ part { name: "swallow";
+ type: SWALLOW;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 0;
+ rel1 {
+ to: "bg";
+ offset: 18 18;
+ }
+ rel2 {
+ to: "bg";
+ offset: -20 -20;
+ }
+ }
+ }
+ part { name: "outline";
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ visible: 0;
+ align: 0.0 0.0;
+ rel1 { to: "bg"; offset: 0 0; }
+ rel2 { to: "bg"; offset: -1 -1; }
+ image {
+ border: 25 25 35 25;
+ }
+ image.middle: SOLID;
+ fill.smooth: 0;
+ }
+ }
+ }
+ }
+
+
+ group { name: "elm/entry/magnifier/fixed-size";
+ data.item: "height" MAGNIFIER_HEIGHT;
+ data.item: "scale" MAGNIFIER_SCALE;
+ images {
+ }
+ parts {
+ part { name: "bg";
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ min: 224 MAGNIFIER_HEIGHT;
+ align: 0.5 0.0;
+ visible: 0;
+ image {
+ border: 25 25 35 25;
+ }
+ image.middle: SOLID;
+ fill.smooth: 0;
+ }
+ }
+ part { name: "swallow";
+ type: SWALLOW;
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ align: 0.0 0.0;
+ visible: 0;
+ rel1 {
+ to: "bg";
+ offset: 18 18;
+ }
+ rel2 {
+ to: "bg";
+ offset: -20 -20;
+ }
+ }
+ }
+ part { name: "outline";
+ mouse_events: 0;
+ scale: 1;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ visible: 0;
+ align: 0.0 0.0;
+ rel1 { to: "bg"; offset: 0 0; }
+ rel2 { to: "bg"; offset: -1 -1; }
+ image {
+ border: 25 25 35 25;
+ }
+ image.middle: SOLID;
+ fill.smooth: 0;
+ }
+ }
+ }
+ }
+
+ group { name: "elm/entry/matchlist/default";
+ data.item: "max_height" "230";
+ parts {
+ part { name: "base";
+ type: RECT;
+ scale : 1;
+ mouse_events: 1;
+ repeat_events: 1;
+ description { state: "default" 0.0;
+ color: 0 0 0 0;
+ rel1 {
+ relative: 0.0 0.0;
+ offset: 0 20;
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ offset: 0 20;
+ }
+ }
+ }
+ part { name: "elm.swallow.content";
+ type: SWALLOW;
+ description { state: "default" 0.0;
+ align: 0.0 0.0;
+ rel1 {
+ to: "base";
+ }
+ rel2 {
+ to: "base";
+ }
+ }
+ }
+ }
+ }
+
+#define BUBBLE_EX_PAD 10
+#define BUBBLE_IX_PAD 14
+#define BUBBLE_Y_PAD 10
+
+ group { name: "elm/entry/base/readmessage";
+ 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: "elm.rect.left.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: BUBBLE_EX_PAD 0;
+ fixed: 1 0;
+ align: 0.0 0.0;
+ color: 0 0 0 0;
+ rel2.relative: 0.0 1.0;
+ }
+ }
+ part {
+ name: "elm.rect.right.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: BUBBLE_IX_PAD 0;
+ fixed: 1 0;
+ align: 0.0 0.0;
+ color: 0 0 0 0;
+ rel1 { relative: 1.0 0.0; to: "elm.text"; }
+ rel2.to: "elm.text";
+ }
+ }
+ part {
+ name: "elm.rect.top.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 BUBBLE_Y_PAD;
+ fixed: 0 1;
+ align: 0.0 0.0;
+ color: 0 0 0 0;
+ rel2.relative: 1.0 0.0;
+ }
+ }
+ part {
+ name: "elm.rect.bottom.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 BUBBLE_Y_PAD;
+ fixed: 0 1;
+ align: 0.0 1.0;
+ color: 0 0 0 0;
+ rel1.relative: 0.0 1.0;
+ }
+ }
+ part {
+ name: "elm.image.bg";
+ type: IMAGE;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel2.to_x: "elm.rect.right.pad";
+ image {
+ border: 1 11 7 12;
+ border_scale: 1;
+ }
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ mouse_events: 1;
+ scale: 1;
+ entry_mode: EDITABLE;
+ select_mode: BLOCK_HANDLE;
+ multiline: 1;
+ 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;
+ fixed: 1 0;
+ align: 0.0 0.0;
+ rel1 { relative: 1.0 1.0; to: "elm.rect.left.pad"; to_y: "elm.rect.top.pad"; }
+ rel2 { relative: 1.0 0.0; to_y: "elm.rect.bottom.pad"; }
+ text {
+ style: "entry_textblock_style";
+ min: 0 1;
+ max: 1 0;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ text {
+ style: "entry_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-noedit/readmessage";
+ 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: "elm.rect.left.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: BUBBLE_EX_PAD 0;
+ fixed: 1 0;
+ align: 0.0 0.0;
+ color: 0 0 0 0;
+ rel2.relative: 0.0 1.0;
+ }
+ }
+ part {
+ name: "elm.rect.right.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: BUBBLE_IX_PAD 0;
+ fixed: 1 0;
+ align: 0.0 0.0;
+ color: 0 0 0 0;
+ rel1 { relative: 1.0 0.0; to: "elm.text"; }
+ rel2.to: "elm.text";
+ }
+ }
+ part {
+ name: "elm.rect.top.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 BUBBLE_Y_PAD;
+ fixed: 0 1;
+ align: 0.0 0.0;
+ color: 0 0 0 0;
+ rel2.relative: 1.0 0.0;
+ }
+ }
+ part {
+ name: "elm.rect.bottom.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 BUBBLE_Y_PAD;
+ fixed: 0 1;
+ align: 0.0 1.0;
+ color: 0 0 0 0;
+ rel1.relative: 0.0 1.0;
+ }
+ }
+ part {
+ name: "elm.image.bg";
+ type: IMAGE;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel2.to_x: "elm.rect.right.pad";
+ image {
+ border: 1 11 7 12;
+ border_scale: 1;
+ }
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ mouse_events: 1;
+ scale: 1;
+ entry_mode: PLAIN;
+ select_mode: BLOCK_HANDLE;
+ multiline: 1;
+ source: "elm/entry/selection/default";
+ source2: "elm/entry/selection/block_handle";
+ source3: "elm/entry/selection/block_handle_top";
+ source5: "elm/entry/anchor/default";
+ description { state: "default" 0.0;
+ fixed: 1 0;
+ align: 0.0 0.0;
+ rel1 { relative: 1.0 1.0; to_x: "elm.rect.left.pad"; to_y: "elm.rect.top.pad"; }
+ rel2 { relative: 1.0 0.0; to_y: "elm.rect.bottom.pad"; }
+ text {
+ style: "entry_textblock_style";
+ min: 0 1;
+ max: 1 0;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ text {
+ style: "entry_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-noedit-charwrap/readmessage";
+ 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: "elm.rect.left.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: BUBBLE_EX_PAD 0;
+ fixed: 1 0;
+ align: 0.0 0.0;
+ color: 0 0 0 0;
+ rel2.relative: 0.0 1.0;
+ }
+ }
+ part {
+ name: "elm.rect.right.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: BUBBLE_IX_PAD 0;
+ fixed: 1 0;
+ align: 0.0 0.0;
+ color: 0 0 0 0;
+ rel1 { relative: 1.0 0.0; to_x: "elm.text"; }
+ rel2.to_x: "elm.text";
+ }
+ }
+ part {
+ name: "elm.rect.top.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 BUBBLE_Y_PAD;
+ fixed: 0 1;
+ align: 0.0 0.0;
+ color: 0 0 0 0;
+ rel2.relative: 1.0 0.0;
+ }
+ }
+ part {
+ name: "elm.rect.bottom.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 BUBBLE_Y_PAD;
+ fixed: 0 1;
+ align: 0.0 1.0;
+ color: 0 0 0 0;
+ rel1.relative: 0.0 1.0;
+ }
+ }
+ part {
+ name: "elm.image.bg";
+ type: IMAGE;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel2.to_x: "elm.rect.right.pad";
+ image {
+ border: 1 11 7 12;
+ border_scale: 1;
+ }
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ mouse_events: 1;
+ scale: 1;
+ entry_mode: PLAIN;
+ select_mode: BLOCK_HANDLE;
+ multiline: 1;
+ source: "elm/entry/selection/default";
+ source2: "elm/entry/selection/block_handle";
+ source3: "elm/entry/selection/block_handle_top";
+ source5: "elm/entry/anchor/default";
+ description { state: "default" 0.0;
+ fixed: 1 0;
+ align: 0.0 0.0;
+ rel1 { relative: 1.0 1.0; to_x: "elm.rect.left.pad"; to_y: "elm.rect.top.pad"; }
+ rel2 { relative: 1.0 0.0; to_y: "elm.rect.bottom.pad"; }
+ text {
+ style: "entry_textblock_style_charwrap";
+ min: 0 1;
+ max: 1 0;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ text {
+ style: "entry_textblock_disabled_style_charwrap";
+ }
+ }
+ }
+ }
+ 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/sentmessage";
+ 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: "elm.rect.right.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: BUBBLE_EX_PAD 0;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ color: 0 0 0 0;
+ rel1.relative: 1.0 0.0;
+ }
+ }
+ part {
+ name: "elm.rect.left.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: BUBBLE_IX_PAD 0;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ color: 0 0 0 0;
+ rel1 { relative: 0.0 0.0; to: "elm.text"; }
+ rel2 { relative: 0.0 1.0; to: "elm.text"; }
+ }
+ }
+ part {
+ name: "elm.rect.top.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 BUBBLE_Y_PAD;
+ fixed: 0 1;
+ align: 0.0 0.0;
+ color: 0 0 0 0;
+ rel2.relative: 1.0 0.0;
+ }
+ }
+ part {
+ name: "elm.rect.bottom.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 BUBBLE_Y_PAD;
+ fixed: 0 1;
+ align: 0.0 1.0;
+ color: 0 0 0 0;
+ rel1.relative: 0.0 1.0;
+ }
+ }
+ part {
+ name: "elm.image.bg";
+ type: IMAGE;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1.to_x: "elm.rect.left.pad";
+ image {
+ border: 11 1 7 12;
+ border_scale: 1;
+ }
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ mouse_events: 1;
+ scale: 1;
+ entry_mode: EDITABLE;
+ select_mode: BLOCK_HANDLE;
+ multiline: 1;
+ 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;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ rel1 { relative: 0.0 1.0; to_y: "elm.rect.top.pad";}
+ rel2 { relative: 0.0 0.0; to_x: "elm.rect.right.pad"; to_y: "elm.rect.bottom.pad"; }
+ text {
+ style: "entry_textblock_style";
+ min: 0 1;
+ max: 1 0;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ text {
+ style: "entry_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-noedit/sentmessage";
+ 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: "elm.rect.right.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: BUBBLE_EX_PAD 0;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ color: 0 0 0 0;
+ rel1.relative: 1.0 0.0;
+ }
+ }
+ part {
+ name: "elm.rect.left.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: BUBBLE_IX_PAD 0;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ color: 0 0 0 0;
+ rel1 { relative: 0.0 0.0; to: "elm.text"; }
+ rel2 { relative: 0.0 1.0; to: "elm.text"; }
+ }
+ }
+ part {
+ name: "elm.rect.top.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 BUBBLE_Y_PAD;
+ fixed: 0 1;
+ align: 0.0 0.0;
+ color: 0 0 0 0;
+ rel2.relative: 1.0 0.0;
+ }
+ }
+ part {
+ name: "elm.rect.bottom.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 BUBBLE_Y_PAD;
+ fixed: 0 1;
+ align: 0.0 1.0;
+ color: 0 0 0 0;
+ rel1.relative: 0.0 1.0;
+ }
+ }
+ part {
+ name: "elm.image.bg";
+ type: IMAGE;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1.to_x: "elm.rect.left.pad";
+ image {
+ border: 11 1 7 12;
+ border_scale: 1;
+ }
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ mouse_events: 1;
+ scale: 1;
+ entry_mode: PLAIN;
+ select_mode: BLOCK_HANDLE;
+ multiline: 1;
+ source: "elm/entry/selection/default";
+ source2: "elm/entry/selection/block_handle";
+ source3: "elm/entry/selection/block_handle_top";
+ source5: "elm/entry/anchor/default";
+ description { state: "default" 0.0;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ rel1 { relative: 0.0 1.0; to_y: "elm.rect.top.pad";}
+ rel2 { relative: 0.0 0.0; to_x: "elm.rect.right.pad"; to_y: "elm.rect.bottom.pad"; }
+ text {
+ style: "entry_textblock_style";
+ min: 0 1;
+ max: 1 0;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ text {
+ style: "entry_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-noedit-charwrap/sentmessage";
+ 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: "elm.rect.right.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: BUBBLE_EX_PAD 0;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ color: 0 0 0 0;
+ rel1.relative: 1.0 0.0;
+ }
+ }
+ part {
+ name: "elm.rect.left.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: BUBBLE_IX_PAD 0;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ color: 0 0 0 0;
+ rel1 { relative: 0.0 0.0; to: "elm.text"; }
+ rel2 { relative: 0.0 1.0; to: "elm.text"; }
+ }
+ }
+ part {
+ name: "elm.rect.top.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 BUBBLE_Y_PAD;
+ fixed: 0 1;
+ align: 0.0 0.0;
+ color: 0 0 0 0;
+ rel2.relative: 1.0 0.0;
+ }
+ }
+ part {
+ name: "elm.rect.bottom.pad";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 BUBBLE_Y_PAD;
+ fixed: 0 1;
+ align: 0.0 1.0;
+ color: 0 0 0 0;
+ rel1.relative: 0.0 1.0;
+ }
+ }
+ part {
+ name: "elm.image.bg";
+ type: IMAGE;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1.to_x: "elm.rect.left.pad";
+ image {
+ border: 11 1 7 12;
+ border_scale: 1;
+ }
+ }
+ }
+ part { name: "elm.text";
+ type: TEXTBLOCK;
+ mouse_events: 1;
+ scale: 1;
+ entry_mode: PLAIN;
+ select_mode: BLOCK_HANDLE;
+ multiline: 1;
+ source: "elm/entry/selection/default";
+ source2: "elm/entry/selection/block_handle";
+ source3: "elm/entry/selection/block_handle_top";
+ source5: "elm/entry/anchor/default";
+ description { state: "default" 0.0;
+ fixed: 1 0;
+ align: 1.0 0.0;
+ rel1 { relative: 0.0 1.0; to_y: "elm.rect.top.pad";}
+ rel2 { relative: 0.0 0.0; to_x: "elm.rect.right.pad"; to_y: "elm.rect.bottom.pad"; }
+ text {
+ style: "entry_textblock_style_charwrap";
+ min: 0 1;
+ max: 1 0;
+ }
+ }
+ description { state: "disabled" 0.0;
+ inherit: "default" 0.0;
+ text {
+ style: "entry_textblock_disabled_style_charwrap";
+ }
+ }
+ }
+ }
+ 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";
+ }
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#define EV_H 80
+ group{
+ name: "phlock.view.event";
+ parts{
+ part{
+ name: "bg";
+ type: RECT;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ part{
+ name: "arrow_icon_0";
+ type: SWALLOW;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1{
+ relative: 96/MAIN_W 46/114; to:"bg";
+ }
+ rel2{
+ relative: 119/MAIN_W 68/114; to:"bg";
+ }
+ }
+ }
+ part{
+ name: "arrow_icon_1";
+ type: SWALLOW;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1{
+ relative: 184/MAIN_W 46/114; to:"bg";
+ }
+ rel2{
+ relative: 207/MAIN_W 68/114; to:"bg";
+ }
+ }
+ }
+ part{
+ name: "arrow_icon_2";
+ type: SWALLOW;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1{
+ relative: 272/MAIN_W 46/114; to:"bg";
+ }
+ rel2{
+ relative: 295/MAIN_W 68/114; to:"bg";
+ }
+ }
+ }
+ part{
+ name: "arrow_icon_3";
+ type: SWALLOW;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1{
+ relative: 360/MAIN_W 46/114; to:"bg";
+ }
+ rel2{
+ relative: 383/MAIN_W 68/114; to:"bg";
+ }
+ }
+ }
+ part{
+ name: "arrow_icon_4";
+ type: SWALLOW;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1{
+ relative: 448/MAIN_W 46/114; to:"bg";
+ }
+ rel2{
+ relative: 471/MAIN_W 68/114; to:"bg";
+ }
+ }
+ }
+ part{
+ name: "arrow_icon_5";
+ type: SWALLOW;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1{
+ relative: 536/MAIN_W 46/114; to:"bg";
+ }
+ rel2{
+ relative: 559/MAIN_W 68/114; to:"bg";
+ }
+ }
+ }
+ part{
+ name: "emergency_icon";
+ type: SWALLOW;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1{
+ relative: 616/MAIN_W 18/114; to:"bg";
+ }
+ rel2{
+ relative: 672/MAIN_W 74/114; to:"bg";
+ }
+ }
+ }
+ part{
+ name: "emergency_text";
+ type: SWALLOW;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ visible: 1;
+ rel1{
+ relative: 530/MAIN_W 74/114; to:"bg";
+ }
+ rel2{
+ relative: 696/MAIN_W 100/114; to:"bg";
+ }
+ }
+ }
+ }
+
+ }
+
+
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+ group{
+ name: "phlock.view.info";
+
+ parts{
+ part{
+ name: "bg";
+ type: RECT;
+ mouse_events: 0;
+ description{
+ state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ part{
+ name: "label.time";
+ type: SWALLOW;
+ mouse_events: 0;
+ scale: 1;
+ description{
+ state: "default" 0.0;
+ fixed: 1 1;
+ rel1 { relative: 0.0 37/186; to: "bg";}
+ rel2 { relative: 432/440 181/186; to: "bg";}
+ color: 0 0 0 0;
+ }
+ }
+ part{
+ name: "label.date";
+ type: SWALLOW;
+ scale: 1;
+ description{
+ state: "default" 0.0;
+ fixed: 1 1;
+ rel1 { relative: 0.0 5/186; to: "bg";}
+ rel2 { relative: 432/440 32/186; to: "bg";}
+ color: 0 0 0 0;
+ }
+ }
+ }
+ programs{
+ }
+ }
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#define PHONE_LOCK_LABEL_PROGRAMS(part_name, singa_name) \
+ program { \
+ name: "mouse_down_"part_name; \
+ signal: "mouse,down,1"; \
+ source: part_name; \
+ action: STATE_SET "press" 0.0; \
+ target: part_name; \
+ } \
+ program { \
+ name: "send_event_"part_name; \
+ action: SIGNAL_EMIT singa_name ""; \
+ } \
+ program { \
+ name: "mouse_up_"part_name; \
+ signal: "mouse,up,1"; \
+ source: part_name; \
+ action: STATE_SET "default" 0.0; \
+ target: part_name; \
+ after: "send_event_"part_name; \
+ }
+
+#define PHONE_LOCK_INPUT_PROGRAMS(part_name) \
+ program { \
+ name: part_name"_set_default"; \
+ signal: part_name"_set_default"; \
+ source: part_name; \
+ action: STATE_SET "default" 0.0; \
+ target: part_name; \
+ } \
+ program { \
+ name: part_name"_set_input"; \
+ signal: part_name"_set_input"; \
+ source: part_name; \
+ action: STATE_SET "input" 0.0; \
+ target: part_name; \
+ }
+
+group{
+ name: "phlock.view.input.simple";
+ images{
+ image: "B07_button_ok_normal_left.png" COMP;
+ }
+
+ parts{
+ part{
+ name: "background";
+ type: RECT;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+ part{
+ name: "sp1_bg";
+ type: RECT;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ visible: 1;
+ rel1 { relative: 65/MAIN_W 0; to: "background";}
+ rel2 { relative: 199/MAIN_W 1; to: "background";}
+ color: 0 0 0 125; /* The entry in simple lock screen is not exact square */
+ }
+ description{
+ state: "input" 0.0;
+ inherit: "default" 0.0;
+ color: 0 0 0 180;
+ }
+ }
+ part{
+ name: "sp2_bg";
+ type: RECT;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ rel1 { relative: 217/MAIN_W 0; to: "background";}
+ rel2 { relative: 351/MAIN_W 1; to: "background";}
+ color: 0 0 0 125;/* The entry in simple lock screen is not exact square */
+ }
+ description{
+ state: "input" 0.0;
+ inherit: "default" 0.0;
+ color: 0 0 0 180;
+ }
+ }
+ part{
+ name: "sp3_bg";
+ type: RECT;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ rel1 { relative: 369/MAIN_W 0; to: "background";}
+ rel2 { relative: 503/MAIN_W 1; to: "background";}
+ color: 0 0 0 125;/* The entry in simple lock screen is not exact square */
+ }
+ description{
+ state: "input" 0.0;
+ inherit: "default" 0.0;
+ color: 0 0 0 180;
+ }
+ }
+ part{
+ name: "sp4_bg";
+ type: RECT;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ rel1 { relative: 521/MAIN_W 0; to: "background";}
+ rel2 { relative: 655/MAIN_W 1; to: "background";}
+ color: 0 0 0 125;/* The entry in simple lock screen is not exact square */
+ }
+ description{
+ state: "input" 0.0;
+ inherit: "default" 0.0;
+ color: 0 0 0 180;
+ }
+ }
+ part{
+ name: "sp1_entry";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 1.0 0.5;
+ fixed: 1 1;
+ min: 44 0;
+ rel1 { relative: 65/MAIN_W 0.3; to: "background";}
+ rel2 { relative: 199/MAIN_W 1; to: "background";}
+ }
+
+ }
+ part{
+ name: "sp2_entry";
+ type: SWALLOW;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 1.0 0.5;
+ fixed: 1 1;
+ min: 44 0;
+ rel1 { relative: 217/MAIN_W 0.3; to: "background";}
+ rel2 { relative: 351/MAIN_W 1; to: "background";}
+ }
+ }
+ part{
+ name: "sp3_entry";
+ type: SWALLOW;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 1.0 0.5;
+ fixed: 1 1;
+ min: 44 0;
+ rel1 { relative: 369/MAIN_W 0.3; to: "background";}
+ rel2 { relative: 503/MAIN_W 1; to: "background";}
+
+ }
+ }
+ part{
+ name: "sp4_entry";
+ type: SWALLOW;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 1.0 0.5;
+ fixed: 1 1;
+ min: 44 0;
+ rel1 { relative: 521/MAIN_W 0.3; to: "background";}
+ rel2 { relative: 655/MAIN_W 1; to: "background";}
+ }
+ }
+ }
+ programs
+ {
+ PHONE_LOCK_LABEL_PROGRAMS("sp1_bg", "sp1_entry_clicked")
+ PHONE_LOCK_LABEL_PROGRAMS("sp2_bg", "sp2_entry_clicked")
+ PHONE_LOCK_LABEL_PROGRAMS("sp3_bg", "sp3_entry_clicked")
+ PHONE_LOCK_LABEL_PROGRAMS("sp4_bg", "sp4_entry_clicked")
+ PHONE_LOCK_INPUT_PROGRAMS("sp1_bg")
+ PHONE_LOCK_INPUT_PROGRAMS("sp2_bg")
+ PHONE_LOCK_INPUT_PROGRAMS("sp3_bg")
+ PHONE_LOCK_INPUT_PROGRAMS("sp4_bg")
+ }
+}
+
+
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+group{
+ name: "phlock.view.input.complex";
+
+ images{
+ image: "B07_button_ok_normal_left.png" COMP;
+ image: "B07_button_ok_normal_center.png" COMP;
+ image: "B07_button_ok_normal_right.png" COMP;
+ image: "B07_button_ok_press_left.png" COMP;
+ image: "B07_button_ok_press_center.png" COMP;
+ image: "B07_button_ok_press_right.png" COMP;
+ }
+
+ parts{
+ part{
+ name: "background";
+ type: RECT;
+ mouse_events: 0;
+ description{
+ state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
+
+ part{
+ name: "button.r.padding";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description{
+ state: "default" 0.0;
+ align: 1.0 0.0;
+ min: 17 0;
+ fixed: 1 1;
+ rel1{
+ relative: 1.0 0.0;
+ to: "background";
+ }
+ rel2{
+ relative: 1.0 1.0;
+ to: "background";
+ }
+ color: 0 0 0 0;
+ }
+ }
+
+ part{
+ name: "button";
+ type: RECT;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ min: 72 0;
+ fixed: 1 1;
+ rel1{
+ relative: 0.0 0.0;
+ to: "text.l.padding";
+ }
+ rel2{
+ relative: 1.0 1.0;
+ to: "text.r.padding";
+ }
+ color: 0 0 0 0;
+ }
+ }
+
+ part{
+ name: "button.l.padding";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description{
+ state: "default" 0.0;
+ align: 1.0 0.0;
+ min: 10 0;
+ fixed: 1 1;
+ rel1{
+ relative: 0.0 0.0;
+ to: "button";
+ }
+ rel2{
+ relative: 0.0 1.0;
+ to: "button";
+ }
+ color: 0 0 0 0;
+ }
+ }
+
+ part{
+ name: "image.button.left";
+ type: IMAGE;
+ scale: 1;
+ mouse_events: 0;
+ description{
+ state: "default" 0.0;
+ visible: 1;
+ min: 3 0;
+ fixed: 1 1;
+ rel1{
+ relative: 0.0 0.0;
+ to: "text.l.padding";
+ }
+ rel2{
+ relative: 0.0 1.0;
+ to: "text.l.padding";
+ }
+ image.normal: "B07_button_ok_normal_left.png";
+ }
+ description{
+ state: "press" 0.0;
+ inherit: "default" 0.0;
+ image.normal: "B07_button_ok_press_left.png";
+ }
+ }
+ part{
+ name: "image.button.right";
+ type: IMAGE;
+ scale: 1;
+ mouse_events: 0;
+ description{
+ state: "default" 0.0;
+ visible: 1;
+ min: 3 0;
+ align: 1.0 0.0;
+ fixed: 1 1;
+ rel1{
+ relative: 1.0 0.0;
+ to: "text.r.padding";
+ }
+ rel2{
+ relative: 1.0 1.0;
+ to: "text.r.padding";
+ }
+ image.normal: "B07_button_ok_normal_right.png";
+ }
+ description{
+ state: "press" 0.0;
+ inherit: "default" 0.0;
+ image.normal: "B07_button_ok_press_right.png";
+ }
+ }
+ part{
+ name: "image.button.center";
+ type: IMAGE;
+ scale: 1;
+ mouse_events: 0;
+ description{
+ state: "default" 0.0;
+ visible: 1;
+ rel1{
+ relative: 1.0 0.0;
+ to: "image.button.left";
+ }
+ rel2{
+ relative: 0.0 1.0;
+ to: "image.button.right";
+ }
+ image.normal: "B07_button_ok_normal_center.png";
+ }
+ description{
+ state: "press" 0.0;
+ inherit: "default" 0.0;
+ image.normal: "B07_button_ok_press_center.png";
+ }
+ }
+
+ part{
+ name: "text.l.padding";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description{
+ state: "default" 0.0;
+ align: 1.0 0.0;
+ min: 25 0;
+ fixed: 1 1;
+ rel1{
+ relative: 0.0 0.0;
+ to_x: "swallow.button";
+ to_y: "background";
+ }
+ rel2{
+ relative: 0.0 1.0;
+ to_x: "swallow.button";
+ to_y: "background";
+ }
+ color: 0 0 0 0;
+ }
+ }
+
+ part{
+ name: "text.r.padding";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description{
+ state: "default" 0.0;
+ align: 1.0 0.0;
+ min: 36 0;
+ fixed: 1 1;
+ rel1{
+ relative: 0.0 0.0;
+ to: "button.r.padding";
+ }
+ rel2{
+ relative: 0.0 1.0;
+ to: "button.r.padding";
+ }
+ color: 0 0 0 0;
+ }
+ }
+
+ part{
+ name: "swallow.button";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 0;
+ description{
+ state: "default" 0.0;
+ align: 1.0 0.5;
+ fixed: 1 1;
+ min: 76 0; /* If language is not English, the sring of "OK" button in complex lock screen is cut */
+ rel1{
+ relative: 0.0 0.5;
+ to: "text.r.padding";
+ }
+ rel2{
+ relative: 0.0 0.5;
+ to: "text.r.padding";
+ }
+ }
+ }
+
+ part{
+ name: "inputarea";
+ type: RECT;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ color: 0 0 0 128;
+ fixed: 1 0;
+ min: 10 72;
+ rel1{
+ relative: (13/480) 0.0;
+ to: "background";
+ }
+ rel2{
+ relative: 0.0 1.0;
+ to: "button.l.padding";
+ }
+ }
+ }
+
+ part{
+ name: "password.l.padding";
+ type: RECT;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ fixed: 1 1;
+ min: 30 0;
+ rel1{
+ to: "inputarea";
+ }
+ rel2{
+ relative: 0.0 1.0;
+ to: "inputarea";
+ }
+ color: 0 0 0 0;
+ }
+ }
+
+ part{
+ name: "swallow.text";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.5;
+ fixed: 0 1;
+ rel1{
+ relative: 1.0 0.0;
+ to: "password.l.padding";
+ }
+ rel2{
+ to: "inputarea";
+ }
+ }
+ }
+ }
+
+ programs{
+ program{
+ name: "press.button";
+ signal: "press";
+ source: "button";
+ action: STATE_SET "press" 0.0;
+ target: "image.button.left";
+ target: "image.button.center";
+ target: "image.button.right";
+ }
+ program{
+ name: "release.button";
+ signal: "release";
+ source: "button";
+ action: STATE_SET "default" 0.0;
+ target: "image.button.left";
+ target: "image.button.center";
+ target: "image.button.right";
+ }
+ }
+}
+
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+group{
+ name: "phlock.view.main.simple";
+ images{
+ image: "B07_button_ok_normal_left.png" COMP;
+ }
+
+ parts{
+ part{
+ name: "background";
+ type: RECT;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ color: 0 0 0 255;
+ }
+ }
+ part{
+ name: "swallow.bg";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ rel1{
+ to: "background";
+ }
+ rel2{
+ to: "background";
+ }
+ color: 255 255 255 255;
+ }
+ }
+ part{
+ name: "swallow.info.0";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ rel1 { relative: 20/MAIN_W 375/MAIN_H; to: "background";}
+ rel2 { relative: 510/MAIN_W 570/MAIN_H; to: "background";}
+ color: 0 0 0 0;
+ }
+ }
+ part{
+ name: "swallow.info.1";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ rel1 { relative: 230/MAIN_W 375/MAIN_H; to: "background";}
+ rel2 { relative: 705/MAIN_W 570/MAIN_H; to: "background";}
+ color: 0 0 0 0;
+ }
+ }
+ part{
+ name: "swallow.info.2";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ rel1 { relative: 20/MAIN_W 930/MAIN_H; to: "background";}
+ rel2 { relative: 510/MAIN_W 1116/MAIN_H; to: "background";}
+ color: 0 0 0 0;
+ }
+ }
+ part{
+ name: "swallow.info.3";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ rel1 { relative: 230/MAIN_W 930/MAIN_H; to: "background";}
+ rel2 { relative: 705/MAIN_W 1116/MAIN_H; to: "background";}
+ color: 0 0 0 0;
+ }
+ }
+
+ part{
+ name: "swallow.title";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ fixed: 0 1;
+ rel1{
+ relative: 0.0 (139/MAIN_H);
+ to: "background";
+ }
+ rel2{
+ relative: 1.0 (199/MAIN_H);
+ to: "background";
+ }
+ }
+ }
+
+ part{
+ name: "swallow.input";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ rel1 { relative: 0 217/MAIN_H; to: "background";}
+ rel2 { relative: 1 351/MAIN_H; to: "background";}
+
+ }
+ }
+ part{
+ name: "swallow.event.bg";
+ type: RECT;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ fixed: 0 1;
+ rel1{
+ relative: 0.0 (1116/MAIN_H);
+ to: "background";
+ }
+ rel2{
+ relative: 1.0 (1230/MAIN_H);
+ to: "background";
+ }
+ color: 0 0 0 125;
+ }
+ description{
+ state: "up" 0.0;
+ inherit: "default" 0.0;
+ rel1{
+ relative: 0.0 (575/MAIN_H);
+ to: "background";
+ }
+ rel2{
+ relative: 1.0 (689/MAIN_H);
+ to: "background";
+ }
+ color: 0 0 0 125;
+ }
+ }
+
+ part{
+ name: "swallow.event.down";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ fixed: 0 1;
+ rel1{
+ relative: 0.0 (1116/MAIN_H);
+ to: "background";
+ }
+ rel2{
+ relative: 1.0 (1230/MAIN_H);
+ to: "background";
+ }
+ }
+ }
+ part{
+ name: "swallow.event.up";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ fixed: 0 1;
+ rel1{
+ relative: 0.0 (575/MAIN_H);
+ to: "background";
+ }
+ rel2{
+ relative: 1.0 (689/MAIN_H);
+ to: "background";
+ }
+ }
+ }
+ }
+
+ programs{
+ program{
+ name: "bg.event.up";
+ signal: "bg.up";
+ source: "swallow.event.bg";
+ action: STATE_SET "up" 0.0;
+ target: "swallow.event.bg";
+ }
+ program{
+ name: "bg.event.down";
+ signal: "bg.down";
+ source: "swallow.event.bg";
+ action: STATE_SET "default" 0.0;
+ target: "swallow.event.bg";
+ }
+
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+group{
+ name: "phlock.view.main";
+
+ parts{
+ part{
+ name: "background";
+ type: RECT;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ color: 0 0 0 255;
+ }
+ }
+ part{
+ name: "swallow.bg";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ rel1{
+ to: "background";
+ }
+ rel2{
+ to: "background";
+ }
+ color: 255 255 255 255;
+ }
+ }
+ part{
+ name: "swallow.info.0";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ rel1 { relative: 20/MAIN_W 375/MAIN_H; to: "background";}
+ rel2 { relative: 510/MAIN_W 570/MAIN_H; to: "background";}
+ color: 0 0 0 0;
+ }
+ }
+ part{
+ name: "swallow.info.1";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ rel1 { relative: 230/MAIN_W 375/MAIN_H; to: "background";}
+ rel2 { relative: 705/MAIN_W 570/MAIN_H; to: "background";}
+ color: 0 0 0 0;
+ }
+ }
+ part{
+ name: "swallow.info.2";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ rel1 { relative: 20/MAIN_W 930/MAIN_H; to: "background";}
+ rel2 { relative: 510/MAIN_W 1116/MAIN_H; to: "background";}
+ color: 0 0 0 0;
+ }
+ }
+ part{
+ name: "swallow.info.3";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ rel1 { relative: 230/MAIN_W 930/MAIN_H; to: "background";}
+ rel2 { relative: 705/MAIN_W 1116/MAIN_H; to: "background";}
+ color: 0 0 0 0;
+ }
+ }
+
+ part{
+ name: "swallow.title";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ fixed: 0 1;
+ rel1{
+ relative: 0.0 (139/MAIN_H);
+ to: "background";
+ }
+ rel2{
+ relative: 1.0 (199/MAIN_H);
+ to: "background";
+ }
+ }
+ }
+
+ part{
+ name: "swallow.input";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ rel1 { relative: 0 217/MAIN_H; to: "background";}
+ rel2 { relative: 1 351/MAIN_H; to: "background";}
+
+ }
+ }
+ part{
+ name: "swallow.event.bg";
+ type: RECT;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ fixed: 0 1;
+ rel1{
+ relative: 0.0 (1116/MAIN_H);
+ to: "background";
+ }
+ rel2{
+ relative: 1.0 (1230/MAIN_H);
+ to: "background";
+ }
+ color: 0 0 0 125;
+ }
+ description{
+ state: "up" 0.0;
+ inherit: "default" 0.0;
+ rel1{
+ relative: 0.0 (575/MAIN_H);
+ to: "background";
+ }
+ rel2{
+ relative: 1.0 (689/MAIN_H);
+ to: "background";
+ }
+ color: 0 0 0 125;
+ }
+ }
+
+ part{
+ name: "swallow.event.down";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ fixed: 0 1;
+ rel1{
+ relative: 0.0 (1116/MAIN_H);
+ to: "background";
+ }
+ rel2{
+ relative: 1.0 (1230/MAIN_H);
+ to: "background";
+ }
+ }
+ }
+ part{
+ name: "swallow.event.up";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 1;
+ description{
+ state: "default" 0.0;
+ align: 0.0 0.0;
+ fixed: 0 1;
+ rel1{
+ relative: 0.0 (575/MAIN_H);
+ to: "background";
+ }
+ rel2{
+ relative: 1.0 (689/MAIN_H);
+ to: "background";
+ }
+ }
+ }
+ }
+
+ programs{
+ program{
+ name: "bg.event.up";
+ signal: "bg.up";
+ source: "swallow.event.bg";
+ action: STATE_SET "up" 0.0;
+ target: "swallow.event.bg";
+ }
+ program{
+ name: "bg.event.down";
+ signal: "bg.down";
+ source: "swallow.event.bg";
+ action: STATE_SET "default" 0.0;
+ target: "swallow.event.bg";
+ }
+
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#define TITLE_Y 80
+#define INPUT_Y 135
+#define SELECT_TOP_UP_Y 360
+#define SELECT_TOP_MIDDLE_Y 374
+#define SELECT_TOP_DOWN_Y 510
+#define SELECT_BOTTOM_UP_Y 699
+#define SELECT_BOTTOM_MIDDLE_Y 813
+#define SELECT_BOTTOM_DOWN_Y 888
+
+#define MAIN_W 720
+#define MAIN_H 1280
+
+collections {
+ #include "phone-lock-view-main.edc"
+ #include "phone-lock-view-main-simple.edc"
+ #include "phone-lock-view-input.edc"
+ #include "phone-lock-view-input-simple.edc"
+ #include "phone-lock-view-event.edc"
+ #include "phone-lock-view-info.edc"
+}
+
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#define FONT_BLD "HelveticaNeueBld"
+#define FONT_MED "HelveticaNeueMed"
+#define FONT_ROM "HelveticaNeueRom"
+#define FONT_LIG "HelveticaNeueLig"
+
+styles {
+ style {
+ name: "mesg_style";
+ base: "font="FONT_MED" font_size=30 color=#ffffffff wrap=word align=center valign=middle";
+ }
+}
+
+collections {
+ group {
+ name, "main";
+
+ parts {
+ part { name, "bg";
+ type, RECT;
+ description {
+ state, "default" 0.0;
+ color, 0 0 0 255;
+ }
+ }
+
+ part {
+ name: "tip_part";
+ type: SWALLOW;
+ mouse_events: 0;
+ scale:1;
+ description {
+ state: "default" 0.0;
+ fixed: 1 1;
+ rel1 { relative: 0.15 0.05; to: "bg";}
+ rel2 { relative: 0.85 0.12; to: "bg";}
+ }
+ }
+
+ part { name, "bg_entry";
+ type, RECT;
+ mouse_events, 0;
+ description {
+ state, "default" 0.0;
+ visible : 1;
+ rel1 { relative, 0.15 0.16; to, bg; }
+ rel2 { relative, 0.85 0.24; to, bg; }
+ color, 255 255 255 255;
+ }
+ description{
+ state, "block" 0.0;
+ visible : 0;
+ }
+ }
+
+ part { name, "sw_entry";
+ type, SWALLOW;
+ mouse_events, 1;
+ description {
+ state, "default" 0.0;
+ rel1 { to, bg_entry; }
+ rel2 { to, bg_entry; }
+ }
+ }
+
+ part { name, "message";
+ type, TEXTBLOCK;
+ scale, 1;
+ mouse_events, 0;
+ description {
+ state, "default" 0.0;
+ rel1 { relative, 0.1 0.25; to, bg; }
+ rel2 { relative, 0.9 0.4; to, bg; }
+ text.style, mesg_style;
+ color, 255 255 255 255;
+ }
+ }
+ }
+
+ programs{
+ program{
+ name: "mode_change";
+ signal: "SIG_BLOCKENTRY";
+ source: "BLOCKENTRY";
+ action: STATE_SET "block" 0.0;
+ target: "bg_entry";
+ }
+ }
+ }
+}
--- /dev/null
+phone-lock (0.2.1-1) unstable; urgency=low
+
+ * fix time update
+ * Git: pkgs/p/phone-lock
+ * Tag: phone-lock_0.2.1-1
+
+ -- Seungtaek Chung <seungtaek.chung@samsung.com> Wed, 04 Apr 2012 14:57:29 +0900
+
+phone-lock (0.2.0-1) unstable; urgency=low
+
+ * Add spec file
+ * Git: pkgs/p/phone-lock
+ * Tag: phone-lock_0.2.0-1
+
+ -- Mi-Ju Lee <miju52.lee@samsung.com> Tue, 20 Mar 2012 19:34:32 +0900
+
+phone-lock (0.1.12) unstable; urgency=low
+
+ * EFL update
+ * Git: pkgs/p/phone-lock
+ * Tag: phone-lock_0.1.12
+
+ -- Seungtaek Chung <seungtaek.chung@samsung.com> Fri, 17 Feb 2012 13:35:34 +0900
+
+phone-lock (0.1.11) unstable; urgency=low
+
+ * update boilerplate
+ * Git: pkgs/p/phone-lock
+ * Tag: phone-lock_0.1.11
+
+ -- Seungtaek Chung <seungtaek.chung@samsung.com> Thu, 16 Feb 2012 10:14:16 +0900
+
+phone-lock (0.1.10) unstable; urgency=low
+
+ * fix ime hide
+ * Git: pkgs/p/phone-lock
+ * Tag: phone-lock_0.1.10
+
+ -- Seungtaek Chung <seungtaek.chung@samsung.com> Wed, 28 Dec 2011 18:20:03 +0900
+
+phone-lock (0.1.9) unstable; urgency=low
+
+ * Update pkgname to org.tizen
+ * Git: pkgs/p/phone-lock
+ * Tag: phone-lock_0.1.9
+
+ -- Mi-Ju Lee <miju52.lee@samsung.com> Fri, 23 Dec 2011 16:01:18 +0900
+
+phone-lock (0.1.8) unstable; urgency=low
+
+ * fix wallpaper
+ * Git: pkgs/p/phone-lock
+ * Tag: phone-lock_0.1.8
+
+ -- Seungtaek Chung <seungtaek.chung@samsung.com> Wed, 21 Dec 2011 16:19:42 +0900
+
+phone-lock (0.1.7) unstable; urgency=low
+
+ * Initial released
+ * Git: pkgs/p/phone-lock
+ * Tag: phone-lock_0.1.7
+
+ -- Seungtaek Chung <seungtaek.chung@samsung.com> Wed, 07 Dec 2011 23:12:56 +0900
--- /dev/null
+Source: phone-lock
+Section: devel
+Priority: extra
+Maintainer: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+Build-Depends: debhelper (>= 5), libappcore-efl-dev, libelm-dev, libslp-setting-dev, libslp-utilx-dev, libui-gadget-dev, dlog-dev, libbundle-dev, libecore-dev, libeina-dev, libevas-dev, libedje-dev, libaul-1-dev, libslp-sysman-dev, libicu-dev, libsecurity-server-client-dev, libheynoti-dev
+Standards-Version: 3.7.2
+
+Package: org.tizen.phone-lock
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: pwlock
+
+Package: org.tizen.phone-lock-dbg
+Section: debug
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, org.tizen.phone-lock
+Description: debug package of phone lock
--- /dev/null
+@PREFIX@/bin/*
+@PREFIX@/lib/*
+@PREFIX@/data
+@PREFIX@/res/locale/*
+@PREFIX@/res/edje/*
+@PREFIX@/res/images/*
+/opt/share/applications/*
+/opt/ug/*
--- /dev/null
+#!/bin/sh
+#This is pwlock postinst file
+
+GOPTION="" # Set without -g, -u options
+if [ ${USER} == "root" ]
+then
+ # 5000 is inhouse user id
+ # do not use relative path
+ chown -R 5000:5000 /opt/apps/org.tizen.phone-lock/data
+
+ # Set vconf values with -g/-u options
+ GOPTION="-g 6514"
+fi
+
+#echo $GOPTION
+
+# check first boot
+#vconftool $GOPTION set -t int db/setting/phone_lock_attempts_left "5"
+#vconftool $GOPTION set -t string db/setting/phone_lock_timestamp ""
+
--- /dev/null
+#!/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 ?=
+LDFLAGS ?=
+PREFIX ?= /opt/apps/org.tizen.phone-lock
+RESDIR ?= /opt/apps/org.tizen.phone-lock/res
+DATADIR ?= /opt/apps/org.tizen.phone-lock/data
+
+CFLAGS += -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+CFLAGS += -fPIE
+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)
+ rm -rf debian/phone-lock-dbg
+
+ 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.phone-lock-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
+
--- /dev/null
+%define _app_prefix /opt/apps/org.tizen.phone-lock
+
+Name: org.tizen.phone-lock
+Summary: Phone lock
+Version: 0.2.1
+Release: 1
+Group: Communication
+License: Samsung Proprietary License
+Source0: %{name}-%{version}.tar.gz
+BuildRequires: pkgconfig(appcore-efl)
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(utilX)
+BuildRequires: pkgconfig(ui-gadget)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(bundle)
+BuildRequires: pkgconfig(ecore-input)
+BuildRequires: pkgconfig(eina)
+BuildRequires: pkgconfig(evas)
+BuildRequires: pkgconfig(edje)
+BuildRequires: edje-tools
+BuildRequires: pkgconfig(aul)
+BuildRequires: pkgconfig(sysman)
+BuildRequires: pkgconfig(icu-i18n)
+BuildRequires: pkgconfig(security-server)
+BuildRequires: cmake
+BuildRequires: pkgconfig(openssl)
+BuildRequires: gettext-tools
+BuildRequires: pkgconfig(heynoti)
+
+
+%description
+phone lock.
+
+
+%prep
+%setup -q
+
+
+%build
+LDFLAGS+="-Wl,--rpath=%{_app_prefix}/lib -Wl,--as-needed"
+LDFLAGS=$LDFLAGS cmake . -DCMAKE_INSTALL_PREFIX=%{_app_prefix}
+make
+
+%install
+%make_install
+mkdir -p %{buildroot}/%{_app_prefix}/data
+
+%post
+chown -R 5000:5000 %{_app_prefix}/data
+
+
+%files
+%{_app_prefix}/data
+%{_app_prefix}/bin/*
+%{_app_prefix}/lib/*.so
+%{_app_prefix}/res/images/*
+%{_app_prefix}/res/edje/*
+%{_app_prefix}/res/locale/*/LC_MESSAGES/phone-lock.mo
+/opt/share/applications/org.tizen.phone-lock.desktop
+/opt/ug/lib/libug-phone-lock-efl.so
--- /dev/null
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${PHONE_LOCK_MAIN}/include)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs_common REQUIRED appcore-efl appcore-common icu-i18n elementary ui-gadget x11 dlog vconf security-server heynoti)
+
+FOREACH(flag ${pkgs_common_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl, --rpath=${PREFIX}/lib -pie")
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DEXPORT_API=__attribute__ \(\(visibility\(\"default\"\)\)\)")
+
+ADD_LIBRARY(${PHONE_LOCK_COMMON} SHARED
+ ./src/phone-lock-view.c
+ ./src/phone-lock-string.c
+ ./src/phone-lock-verification.c
+ ./src/phone-lock-gadget.c
+ ./src/phone-lock-util.c
+)
+#SET_TARGET_PROPERTIES(${PHONE_LOCK_COMMON} PROPERTIES SOVERSION 0.1.0)
+TARGET_LINK_LIBRARIES(${PHONE_LOCK_COMMON} ${pkgs_common_LDFLAGS})
+
+INSTALL(TARGETS ${PHONE_LOCK_COMMON} DESTINATION lib)
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#ifndef __PWLOCK_GADGET_H__
+#define __PWLOCK_GADGET_H__
+
+#include <Elementary.h>
+
+typedef void (*phone_lock_gadget_destroy_cb) (void *user_data);
+
+void *phone_lock_gadget_show_dialer(Evas_Object * win, struct ui_gadget *parent,
+ phone_lock_gadget_destroy_cb destroy_cb,
+ void *user_data);
+
+#endif /* __PWLOCK_GADGET_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#ifndef __PHONE_LOCK_COMMON_STRING_H__
+#define __PHONE_LOCK_COMMON_STRING_H__
+
+#if !defined(ICON_DIR)
+#define ICON_DIR "/opt/apps/org.tizen.phone-lock/res/images"
+#endif
+
+#if !defined(PACKAGE)
+#define PACKAGE "org.tizen.phone-lock"
+#endif
+
+#if !defined(LOCALEDIR)
+#define LOCALEDIR "/opt/apps/org.tizen.phone-lock/res/locale"
+#endif
+
+enum {
+ IDS_COM_BODY_ENTER_PASSWORD = 0,
+ IDS_COM_SK_OK,
+
+ IDS_PHONE_LOCK_SYSTEM_STRING_MAX,
+};
+
+enum {
+ IDS_IDLE_BODY_PD_ATTEMPTS_LEFT = IDS_PHONE_LOCK_SYSTEM_STRING_MAX,
+ IDS_IDLE_BODY_WRONG_PASSWORD,
+ IDS_IDLE_BODY_PASSWORD_EMPTY,
+ IDS_IDLE_BODY_EMERGENCY_CALL,
+ IDS_IDLE_BODY_PD_TO_PD_DIGITS_OR_LETTERS_REQUIRED,
+ IDS_IDLE_BODY_TRY_LATER,
+ IDS_IDLE_BODY_INPUT_PASSWORD_AFTER_THIRTYSECONDS,
+
+ IDS_PHONE_LOCK_APP_STRING_MAX,
+};
+
+char *phone_lock_get_string(int id);
+
+#endif /* __PHONE_LOCK_COMMON_STRING_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#ifndef __PHONE_LOCK_UTIL_H__
+#define __PHONE_LOCK_UTIL_H__
+
+#include <dlog.h>
+#include <Elementary.h>
+#include <glib.h>
+
+#ifdef LOG_TAG
+#undef LOG_TAG
+#endif
+
+#define LOG_TAG "phone-lock"
+#define LOGFILE "/tmp/phone-lock.log"
+
+#define ENABLE_LOG_SYSTEM
+
+void phone_lock_log_t(char *fmt, ...);
+
+#ifdef ENABLE_LOG_SYSTEM
+#define PHONE_LOCK_ERR(fmt, arg...) LOGE("["LOG_TAG"%s:%d:E] "fmt,__FILE__,__LINE__, ##arg)
+#define PHONE_LOCK_DBG(fmt, arg...) LOGD("["LOG_TAG"%s:%d:D] "fmt,__FILE__,__LINE__, ##arg)
+#define PHONE_LOCK_WARN(fmt, arg...) LOGW("["LOG_TAG"%s:%d:D] "fmt,__FILE__,__LINE__, ##arg)
+#else
+#define PHONE_LOCK_ERR(fmt, arg...)
+#define PHONE_LOCK_DBG(fmt, arg...)
+#define PHONE_LOCK_WARN(fmt, arg...)
+#endif
+
+#ifdef ENABLE_LOG_SYSTEM
+#define _ERR(fmt, arg...) do { PHONE_LOCK_ERR(fmt, ##arg); phone_lock_log_t("["LOG_TAG":%d:E] "fmt,__LINE__, ##arg); } while(0)
+#define _DBG(fmt, arg...) do { PHONE_LOCK_DBG(fmt, ##arg); phone_lock_log_t("["LOG_TAG":%d:D] "fmt,__LINE__, ##arg); } while(0)
+#else
+#define _ERR(...)
+#define _DBG(...)
+#endif
+
+Evas_Object *phone_lock_create_win(const char *name);
+int phone_lock_send_cmd(const char *cmd);
+#endif /* __PHONE_LOCK_UTIL_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#ifndef __PHONE_LOCK_VERIFICATION_H__
+#define __PHONE_LOCK_VERIFICATION_H__
+
+int phone_lock_verification_check_length(const char *str, int min, int max);
+
+int phone_lock_verification_check_phone_password(const char *str);
+
+#endif /* __PHONE_LOCK_VERIFICATION_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#ifndef __PHONE_LOCK_VIEW_H__
+#define __PHONE_LOCK_VIEW_H__
+
+#include <Elementary.h>
+
+typedef struct _phone_lock_view_data phone_lock_view_data_t;
+
+typedef void (*phone_lock_view_cbfunc) (int, const char *, void *);
+
+typedef enum _phone_lock_view_type {
+
+ PHONE_LOCK_VIEW_TYPE_PHONE_LOCK = 0,
+ PHONE_LOCK_VIEW_TYPE_PIN_LOCK,
+ PHONE_LOCK_VIEW_TYPE_PHONE_MAX,
+} phone_lock_view_type_t;
+
+typedef enum _phone_lock_window_type {
+ PHONE_LOCK_WINDOW_TYPE_NORMAL = 0,
+ PHONE_LOCK_WINDOW_TYPE_ALPHA,
+} phone_lock_window_type_t;
+
+typedef enum _phone_lock_view_password_type {
+ PHONE_LOCK_VIEW_COMPLEX_PHONE_LOCK = 0,
+ PHONE_LOCK_VIEW_SIMPLE_PHONE_LOCK
+} phone_lock_view_password_type_t;
+
+typedef enum _phone_lock_view_info_align_type {
+ PHONE_LOCK_VIEW_ALIGN_LEFT = 0,
+ PHONE_LOCK_VIEW_ALIGN_CENTER,
+ PHONE_LOCK_VIEW_ALIGN_RIGHT
+} phone_lock_view_info_align_type_t;
+
+phone_lock_view_data_t *phone_lock_view_create(phone_lock_view_type_t view_type,
+ phone_lock_window_type_t
+ window_type,
+ Evas_Object * win_main,
+ phone_lock_view_cbfunc func,
+ void *user_data);
+
+void phone_lock_view_destroy(phone_lock_view_data_t * phone_lock_view_data);
+
+Evas_Object *phone_lock_view_get_layoutmain(phone_lock_view_data_t *
+ phone_lock_view_data);
+
+phone_lock_view_type_t
+phone_lock_view_get_type(phone_lock_view_data_t * phone_lock_view_data);
+
+phone_lock_window_type_t
+phone_lock_window_get_type(phone_lock_view_data_t * phone_lock_view_data);
+
+void
+phone_lock_view_show_msg(phone_lock_view_data_t * phone_lock_view_data,
+ const char *str);
+
+void phone_lock_view_check_attempts_left(void *data);
+void phone_lock_view_reset_callug_launch_flag(void *data);
+void phone_lock_view_set_right_password_flag(void *data);
+void phone_lock_view_reset_attempts_num(void *data);
+void phone_lock_view_hide_imf_context_input_panel(void *data);
+void phone_lock_view_show_imf_context_input_panel(void *data);
+
+#endif /* __PHONE_LOCK_VIEW_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#include <ui-gadget-module.h>
+#include <bundle.h>
+
+#include "phone-lock-gadget.h"
+#include "phone-lock-util.h"
+
+static phone_lock_gadget_destroy_cb gdestroy_cb = NULL;
+
+static void
+_phone_lock_gadget_layout_cb(struct ui_gadget *ug, enum ug_mode mode,
+ void *priv)
+{
+ PHONE_LOCK_DBG("%s\n", __FUNCTION__);
+
+ Evas_Object *base;
+ Evas_Object *win;
+
+ if (!ug)
+ return;
+
+ base = (Evas_Object *) ug_get_layout(ug);
+ win = (Evas_Object *) ug_get_window();
+
+ if (!base) {
+ PHONE_LOCK_DBG("Error : base layout is null.\n",
+ __FUNCTION__);
+ return;
+ }
+
+ switch (mode) {
+ case UG_MODE_FULLVIEW:
+ evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(win, base);
+ evas_object_show(base);
+ break;
+ default:
+ break;
+ }
+}
+
+static void
+_phone_lock_gadget_result_cb(struct ui_gadget *ug, bundle * result, void *priv)
+{
+ PHONE_LOCK_DBG("%s\n", __FUNCTION__);
+}
+
+static void _phone_lock_gadget_destroy_cb(struct ui_gadget *ug, void *priv)
+{
+ PHONE_LOCK_DBG("%s\n", __FUNCTION__);
+
+ if (ug) {
+ gdestroy_cb(priv);
+
+ ug_destroy(ug);
+ }
+}
+
+void *phone_lock_gadget_show_dialer(Evas_Object * win, struct ui_gadget *parent,
+ phone_lock_gadget_destroy_cb destroy_cb,
+ void *user_data)
+{
+ PHONE_LOCK_DBG("%s\n", __FUNCTION__);
+
+ bundle *b;
+ struct ui_gadget *ug;
+
+ struct ug_cbs *cbs = (struct ug_cbs *)calloc(1, sizeof(struct ug_cbs));
+ if (!cbs)
+ return NULL;
+
+ b = bundle_create();
+ bundle_add(b, "emergency_dialer", "emergency");
+
+ cbs->layout_cb = _phone_lock_gadget_layout_cb;
+ cbs->result_cb = _phone_lock_gadget_result_cb;
+ cbs->destroy_cb = _phone_lock_gadget_destroy_cb;
+ cbs->priv = user_data;
+
+ gdestroy_cb = destroy_cb;
+
+ ug = ug_create(parent, "dialer-efl", UG_MODE_FULLVIEW, b, cbs);
+
+ bundle_free(b);
+ free(cbs);
+
+ evas_object_show(win);
+
+ PHONE_LOCK_DBG("%s : win %p\n", __FUNCTION__, win);
+
+ return (void *)ug;
+}
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#include <stdio.h>
+#include <libintl.h>
+
+#include "phone-lock-util.h"
+#include "phone-lock-string.h"
+
+const char *sys_str_table[] = {
+ "IDS_COM_BODY_ENTER_PASSWORD",
+ "IDS_COM_SK_OK",
+};
+
+const char *app_str_table[] = {
+ "IDS_IDLE_BODY_PD_ATTEMPTS_LEFT", /* msgstr "%d attempts left" */
+ "IDS_IDLE_BODY_WRONG_PASSWORD",
+ "IDS_IDLE_BODY_PASSWORD_EMPTY",
+ "IDS_IDLE_BODY_EMERGENCY_CALL",
+ "%d to %d digits or letters required", /* TODO: change to IDS_IDLE_BODY_PD_TO_PD_DIGITS_OR_LETTERS_REQUIRED */
+ "%d s left,please try later!", /* TODO:IDS_IDLE_BODY_TRY_LATER *//* new request */
+ "Please input password again after 30 seconds.", /* new request */
+};
+
+EXPORT_API char *phone_lock_get_string(int id)
+{
+ PHONE_LOCK_DBG("get string id : %d\n", id);
+
+ char *str = NULL;
+
+ if (id < IDS_PHONE_LOCK_SYSTEM_STRING_MAX) {
+ str = dgettext("sys_string", sys_str_table[id]);
+ } else {
+ str =
+ dgettext("phone-lock",
+ app_str_table[id -
+ IDS_PHONE_LOCK_SYSTEM_STRING_MAX]);
+ }
+
+ PHONE_LOCK_DBG("get string : %s\n", str);
+
+ return str;
+}
+
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <appcore-common.h>
+#include <Ecore_X.h>
+#include <Elementary.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <glib.h>
+#include <poll.h>
+
+#include "phone-lock-util.h"
+
+#define LINEMAX 256
+#define MAXFILELEN 1048576
+#define PHONE_LOCK_SOCK_PREFIX "/tmp/phlock"
+#define PHONE_LOCK_SOCK_MAXBUFF 65535
+
+static void _phone_lock_win_del(void *data, Evas_Object * obj, void *event)
+{
+ elm_exit();
+}
+
+inline static void _phone_lock_set_sock_option(int fd, int cli)
+{
+ int size;
+ struct timeval tv = { 1, 200 * 1000 };
+
+ size = PHONE_LOCK_SOCK_MAXBUFF;
+ setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &size, sizeof(size));
+ setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size));
+ if (cli)
+ setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
+}
+
+static int _phone_lock_create_sock(void)
+{
+ struct sockaddr_un saddr;
+ int fd;
+ int retry = 1;
+
+ _DBG("func=%s", __func__);
+
+ fd = socket(AF_UNIX, SOCK_STREAM, 0);
+ if (fd < 0) {
+ _DBG("errno=%s", errno);
+ if (errno == EINVAL) {
+ fd = socket(AF_UNIX, SOCK_STREAM, 0);
+ if (fd < 0) {
+ _DBG("second chance - socket create error");
+ return -1;
+ }
+ } else {
+ _DBG("socket error");
+ return -1;
+ }
+ }
+
+ bzero(&saddr, sizeof(saddr));
+ saddr.sun_family = AF_UNIX;
+
+ strncpy(saddr.sun_path, PHONE_LOCK_SOCK_PREFIX,
+ strlen(PHONE_LOCK_SOCK_PREFIX));
+ saddr.sun_path[strlen(PHONE_LOCK_SOCK_PREFIX)] = 0;
+
+ _DBG("saddr.sun_path = %s", saddr.sun_path);
+
+ retry_con:
+ if (connect(fd, (struct sockaddr *)&saddr, sizeof(saddr)) < 0) {
+ _DBG("maybe peer not launched or peer daed\n");
+ if (retry > 0) {
+ usleep(100 * 1000);
+ retry--;
+ goto retry_con;
+ }
+ close(fd);
+ return -1;
+ }
+ _phone_lock_set_sock_option(fd, 1);
+
+ return fd;
+}
+
+void phone_lock_log_t(char *fmt, ...)
+{
+ va_list ap;
+ FILE *fd = 0;
+ char buf[LINEMAX] = { 0, };
+ char debugString[LINEMAX] = { 0, };
+
+ va_start(ap, fmt);
+ vsnprintf(buf, sizeof(buf), fmt, ap);
+ va_end(ap);
+ int fileLen = 0;
+ struct tm local_t;
+ time_t current_time = 0;
+ bzero((char *)&debugString, LINEMAX);
+ time(¤t_time);
+ gmtime_r(¤t_time, &local_t);
+ int len = snprintf(debugString, sizeof(debugString),
+ "[%d-%02d-%02d, %02d:%02d:%02d]: ",
+ local_t.tm_year + 1900, local_t.tm_mon + 1,
+ local_t.tm_mday, local_t.tm_hour, local_t.tm_min,
+ local_t.tm_sec);
+ if (len == -1) {
+ return;
+ } else {
+ debugString[len] = '\0';
+ }
+ len = g_strlcat(debugString, buf, LINEMAX);
+ if (len >= LINEMAX) {
+ return;
+ } else {
+ debugString[len] = '\n';
+ }
+ if ((fd = fopen(LOGFILE, "at+")) == NULL) {
+ PHONE_LOCK_ERR
+ ("File fopen fail for writing Pwlock information");
+ } else {
+ int pid = -1;
+ if (fwrite(debugString, strlen(debugString), 1, fd) < 1) {
+ PHONE_LOCK_ERR
+ ("File fwrite fail for writing Pwlock information");
+ fclose(fd);
+ if ((pid = fork()) < 0) {
+ } else if (pid == 0) {
+ execl("/bin/rm", "rm", "-f", LOGFILE,
+ (char *)0);
+ }
+ } else {
+ fseek(fd, 0l, SEEK_END);
+ fileLen = ftell(fd);
+ if (fileLen > MAXFILELEN) {
+ fclose(fd);
+ if ((pid = fork()) < 0) {
+ return;
+ } else if (pid == 0) {
+ execl("/bin/rm", "rm", "-f", LOGFILE,
+ (char *)0);
+ }
+ } else
+ fclose(fd);
+ }
+ }
+}
+
+Evas_Object *phone_lock_create_win(const char *name)
+{
+ Evas_Object *eo;
+ int w, h;
+
+ eo = elm_win_add(NULL, name, ELM_WIN_BASIC);
+ if (eo) {
+ elm_win_title_set(eo, name);
+ elm_win_borderless_set(eo, EINA_TRUE);
+ evas_object_smart_callback_add(eo, "delete,request",
+ _phone_lock_win_del, NULL);
+ ecore_x_window_size_get(ecore_x_window_root_first_get(),
+ &w, &h);
+ evas_object_resize(eo, w, h);
+ }
+
+ return eo;
+}
+
+int phone_lock_send_cmd(const char *cmd)
+{
+ int fd;
+ int len;
+ int datalen;
+
+ fd = _phone_lock_create_sock();
+ if (fd < 0) {
+ _DBG("phonelock create sock failed..!!");
+ return -1;
+ }
+
+ if (cmd != NULL) {
+ datalen = strlen(cmd);
+ if ((len = send(fd, cmd, datalen, 0)) != datalen) {
+ _DBG("send() failed %d %d, errno:%d", len, datalen,
+ errno);
+ close(fd);
+ return -1;
+ }
+ }
+ return 0;
+}
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <security-server.h>
+
+#include "phone-lock-util.h"
+#include "phone-lock-verification.h"
+#include "phone-lock-string.h"
+
+#ifndef TRUE
+#define TRUE 1
+#define FALSE 0
+#endif
+
+int phone_lock_verification_check_length(const char *str, int min, int max)
+{
+ int len = 0;
+
+ if (!str) {
+ return IDS_IDLE_BODY_PASSWORD_EMPTY;
+ }
+
+ len = strlen(str);
+
+ PHONE_LOCK_DBG("%s() len : %d", __FUNCTION__, len);
+
+ if (len == 0) {
+ return IDS_IDLE_BODY_PASSWORD_EMPTY;
+ }
+
+ if (len < min || len > max) {
+ return IDS_IDLE_BODY_PD_TO_PD_DIGITS_OR_LETTERS_REQUIRED;
+ }
+
+ return 0;
+}
+
+int phone_lock_verification_check_phone_password(const char *str)
+{
+ PHONE_LOCK_DBG("%s : %s\n", __FUNCTION__, str);
+
+ int ret = SECURITY_SERVER_API_ERROR_PASSWORD_MISMATCH;
+
+ unsigned int current_attempt = 0;
+ unsigned int max_attempt = 0;
+ unsigned int valid_secs = 0;
+
+ ret = security_server_chk_pwd(str, ¤t_attempt, &max_attempt, &valid_secs);
+ if (SECURITY_SERVER_API_SUCCESS == ret) {
+ PHONE_LOCK_DBG("correct password!");
+ return TRUE;
+ } else {
+ return FALSE;
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#include <Ecore_X.h>
+#include <vconf.h>
+#include <appcore-common.h>
+#include <unicode/uloc.h>
+#include <unicode/udat.h>
+#include <unicode/udatpg.h>
+#include <unicode/ustring.h>
+#include <heynoti.h>
+
+#include "phone-lock-util.h"
+#include "phone-lock-view.h"
+#include "phone-lock-string.h"
+#include "phone-lock-verification.h"
+
+#ifndef EDJDIR
+#define EDJDIR "/opt/apps/org.tizen.phone-lock/res/edje"
+#endif
+
+#ifndef IMAGEDIR
+#define IMAGEDIR "/opt/apps/org.tizen.phone-lock/res/images"
+#endif
+
+#define EDJ_PHONE_LOCK_VIEW EDJDIR"/phone-lock-view.edj"
+#define EDJ_PHONE_LOCK_VIEW_ENTRY EDJDIR"/phone-lock-view-entry.edj"
+#define PHONE_LOCK_VIEW_DEFAULT_BG_PATH "/opt/share/settings/Wallpapers/Home_default.png"
+
+#define PHONE_LOCK_VIEW_ARROW_DEFAULT_IMG IMAGEDIR"/B07_event_action_emergency_arrow.png"
+#define PHONE_LOCK_VIEW_ARROW_PRESS_IMG IMAGEDIR"/B07_event_action_emergency_arrow_press.png"
+#define PHONE_LOCK_VIEW_EMERGENCY_CALL_IMG IMAGEDIR"/B07_event_action_emergency.png"
+
+#define VCONFKEY_SETAPPL_PHONE_LOCK_ATTEMPTS_LEFT_INT VCONFKEY_SETAPPL_PREFIX"/phone_lock_attempts_left"
+#define VCONFKEY_SETAPPL_PHONE_LOCK_TIMESTAMP_STR VCONFKEY_SETAPPL_PREFIX"/phone_lock_timestamp"
+
+#define PHONE_LOCK_VIEW_PHONE_LOCK_BLOCK_SECONDS 30
+#define PHONE_LOCK_VIEW_PHONE_LOCK_ATTEMPTS_MAX 5
+#define PHONE_LOCK_VIEW_PHONE_LOCK_TIMESTAMP_STR_LENGTH 200
+#define PHONE_LOCK_VIEW_MAIN_W 720
+#define PHONE_LOCK_VIEW_MAIN_H 1280
+
+#define _EDJ(o) elm_layout_edje_get(o)
+
+#define SYSTEM_RESUME "system_wakeup"
+
+struct _phone_lock_view_data {
+ Evas_Object *win_main;
+ Evas_Object *layout_main;
+ Evas_Object *input;
+ Evas_Object *input_label;
+ Evas_Object *title_label;
+ Evas_Object *input_entry;
+ Evas_Object *background;
+ Evas_Object *sp_label1;
+ Evas_Object *sp_label2;
+ Evas_Object *sp_label3;
+ Evas_Object *sp_label4;
+ Evas_Object *editfield_layout;
+ Evas_Object *event;
+ Evas_Object *ev;
+ Evas_Object *info;
+
+ int win_w;
+ int win_h;
+ int block_seconds;
+ int view_disabled;
+
+ double scale;
+
+ Eina_Bool is_customedentry_clicked;
+ Eina_Bool is_callug_launched;
+ Eina_Bool is_right_password;
+ Eina_Bool is_simple_pw_checking;
+
+ Evas_Coord drx;
+ Evas_Coord dry;
+ Evas_Coord drw;
+ Evas_Coord drh;
+
+ Ecore_Timer *phone_lock_timer;
+ Ecore_Timer *slide_timer;
+ Ecore_Timer *emgc_up_timer;
+ Ecore_Timer *info_timer;
+
+ int heynoti_fd;
+
+ Elm_Theme *theme;
+
+ phone_lock_view_password_type_t lock_type;
+ phone_lock_view_type_t view_type;
+ phone_lock_window_type_t window_type;
+ phone_lock_view_info_align_type_t align_type;
+
+ char *contents;
+ phone_lock_view_cbfunc func;
+ void *user_data;
+};
+
+#define PHONE_LOCK_VIEW_PHONE_LOCK_MAX_LENGTH 16
+#define PHONE_LOCK_VIEW_SIMPLE_PHONE_LOCK_MAX_LENGTH 4
+
+#define EMGC_EV_R 0.073
+#define EMGC_H 55
+#define WIN_H 800
+#define EMGC_DOWN_Y 717
+#define EMGC_UP_Y 357
+#define EMGC_REL_DOWN_Y(win_h) ((win_h * EMGC_DOWN_Y) / WIN_H)
+#define EMGC_REL_UP_Y(win_h) ((win_h * EMGC_UP_Y) / WIN_H)
+
+static Evas_Object *arrow_icon[6] = { 0 };
+
+static Evas_Coord start_pos = 0;
+
+static void _phone_lock_view_enable_phone_lock(void *data);
+static void _phone_lock_view_disable_phone_lock(void *data);
+static void _phone_lock_view_enable_simple_phone_lock(void *data);
+static void _phone_lock_view_disable_simple_phone_lock(void *data);
+static Eina_Bool _phone_lock_view_update_phone_lock_cb(void *data);
+static void _phone_lock_view_update_phone_lock(void *data);
+static void _phone_lock_view_check_vconf_value(void *data);
+static void _phone_lock_view_check_vconf_value_cb(keynode_t * key, void *data);
+static void _phone_lock_view_notify_pm_state_cb(keynode_t * key, void *data);
+static void _phone_lock_view_create_customed_entry(void *data);
+static void _phone_lock_view_destroy_customed_entry(void *data);
+static inline const char *_phone_lock_view_entry_get(Evas_Object * obj);
+static void _phone_lock_view_set_str(char **s, const char *str);
+static void _phone_lock_view_clear_entry_contents(void *data);
+static Evas_Object *_phone_lock_view_editfield_create(Evas_Object * parent,
+ void *data);
+static Evas_Object *_phone_lock_view_editfield_entry_get(Evas_Object * parent);
+
+static inline const char *_phone_lock_view_entry_get(Evas_Object * obj)
+{
+ const char *s = NULL;
+
+ if (obj)
+ s = elm_entry_entry_get(_phone_lock_view_editfield_entry_get
+ (obj));
+
+ return s;
+}
+
+static void _phone_lock_view_set_str(char **s, const char *str)
+{
+ if (s == NULL)
+ return;
+
+ if (*s)
+ free(*s);
+
+ if (str && str[0] != '\0')
+ *s = strdup(str);
+ else
+ *s = NULL;
+}
+
+static void _phone_lock_view_popup_timeout_cb(void *data, Evas_Object * obj,
+ void *event_info)
+{
+ PHONE_LOCK_DBG("timeout cb : %d", (int)event_info);
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+
+ if (phone_lock_view_data == NULL) {
+ return;
+ }
+
+ _phone_lock_view_clear_entry_contents(data);
+ phone_lock_view_show_imf_context_input_panel(data);
+ if (((int) event_info != 5) && (obj != NULL)) {
+ evas_object_del(obj);
+ obj = NULL;
+ }
+}
+
+static void _phone_lock_view_block_clicked_cb(void *data, Evas_Object * obj,
+ void *event_info)
+{
+ PHONE_LOCK_DBG("block clicked cb : %d", (int)event_info);
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+
+ if (phone_lock_view_data == NULL) {
+ return;
+ }
+
+ _phone_lock_view_clear_entry_contents(data);
+ phone_lock_view_show_imf_context_input_panel(data);
+ if (obj) {
+ evas_object_del(obj);
+ obj = NULL;
+ }
+}
+
+static Evas_Object *_phone_lock_view_create_layout(Evas_Object * parent,
+ const char *file,
+ const char *group)
+{
+ Evas_Object *layout;
+ Eina_Bool ret = EINA_FALSE;
+
+ layout = elm_layout_add(parent);
+
+ if (file != NULL && group != NULL) {
+ ret = elm_layout_file_set(layout, file, group);
+ if (ret != EINA_TRUE) {
+ PHONE_LOCK_ERR("Fail elm_layout_file_set");
+ evas_object_del(layout);
+ return NULL;
+ }
+ } else {
+ elm_layout_theme_set(layout, "layout", "application",
+ "default");
+ elm_win_resize_object_add(parent, layout);
+ elm_win_indicator_mode_set(parent, ELM_WIN_INDICATOR_SHOW);
+ }
+
+ evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+
+ evas_object_show(layout);
+
+ return layout;
+}
+
+static void _phone_lock_view_create_bg_image(Evas_Object * parent)
+{
+ char *file = NULL;
+ Evas_Object *image = NULL;
+ Eina_Bool ret = EINA_FALSE;
+
+ if (!parent) {
+ return;
+ }
+ PHONE_LOCK_DBG("");
+
+ if ((file = vconf_get_str(VCONFKEY_IDLE_LOCK_BGSET)) != NULL) {
+
+ } else if ((file = vconf_get_str(VCONFKEY_BGSET)) != NULL) {
+
+ }
+ PHONE_LOCK_DBG("file = %s", file);
+
+ image = elm_image_add(parent);
+ if (file) {
+ ret = elm_image_file_set(image, file, NULL);
+ if (ret == EINA_FALSE) {
+ elm_image_file_set(image,
+ PHONE_LOCK_VIEW_DEFAULT_BG_PATH,
+ NULL);
+ }
+ free(file);
+ file = NULL;
+ }
+
+ elm_object_part_content_set(parent, "swallow.bg", image);
+ evas_object_show(image);
+}
+
+static Eina_Bool _phone_lock_view_set_info_time(void *data)
+{
+ Evas_Object *time_label = NULL;
+ Evas_Object *date_label = NULL;
+ Evas_Object *info = NULL;
+ Ecore_Timer *info_timer = NULL;
+ struct tm st;
+ time_t tt;
+ char buf[512] = { 0, };
+ char bf1[32] = { 0, };
+ char bf2[32] = { 0, };
+ int r;
+ int hour;
+ phone_lock_view_data_t *phone_lock_view_data = NULL;
+ enum appcore_time_format timeformat;
+
+ phone_lock_view_data = (phone_lock_view_data_t *) data;
+
+ if (!phone_lock_view_data) {
+ return 0;
+ }
+ PHONE_LOCK_DBG("");
+
+ info = phone_lock_view_data->info;
+ info_timer = phone_lock_view_data->info_timer;
+
+ if (!info) {
+ return 0;
+ }
+
+ tt = time(NULL);
+ localtime_r(&tt, &st);
+
+ if (info_timer != NULL) {
+ ecore_timer_del(info_timer);
+ info_timer = NULL;
+ }
+
+ info_timer =
+ ecore_timer_add(60 - st.tm_sec, _phone_lock_view_set_info_time,
+ phone_lock_view_data);
+ phone_lock_view_data->info_timer = info_timer;
+
+ r = appcore_get_timeformat(&timeformat);
+ if (r == 0 && timeformat == APPCORE_TIME_FORMAT_24) {
+ strftime(bf1, sizeof(bf1), "%H:%M", &st);
+ switch (phone_lock_view_data->align_type) {
+ case PHONE_LOCK_VIEW_ALIGN_LEFT:
+ snprintf(buf, sizeof(buf), "%s%s%s",
+ "<font_size=150 font=SLP:style=Light style=shadow shadow_color=#000000bf color=#ffffffff align=left>",
+ bf1, "</>");
+ break;
+ case PHONE_LOCK_VIEW_ALIGN_CENTER:
+ snprintf(buf, sizeof(buf), "%s%s%s",
+ "<font_size=150 font=SLP:style=Light style=shadow shadow_color=#000000bf color=#ffffffff align=center>",
+ bf1, "</>");
+ break;
+ case PHONE_LOCK_VIEW_ALIGN_RIGHT:
+ snprintf(buf, sizeof(buf), "%s%s%s",
+ "<font_size=150 font=SLP:style=Light style=shadow shadow_color=#000000bf color=#ffffffff align=right>",
+ bf1, "</>");
+ break;
+ }
+ PHONE_LOCK_DBG("buf = %s", buf);
+ } else {
+ strftime(bf1, sizeof(bf1), "%l", &st);
+ hour = atoi(bf1);
+ strftime(bf1, sizeof(bf1), ":%M", &st);
+
+ if (st.tm_hour >= 0 && st.tm_hour < 12)
+ snprintf(bf2, sizeof(bf2), "%s", "AM");
+ else
+ snprintf(bf2, sizeof(bf2), "%s", "PM");
+
+ switch (phone_lock_view_data->align_type) {
+ case PHONE_LOCK_VIEW_ALIGN_LEFT:
+ snprintf(buf, sizeof(buf), "%s%d%s%s %s%s%s",
+ "<font_size=150 font=SLP:style=Light style=shadow shadow_color=#000000bf color=#ffffffff align=left>",
+ hour, bf1,
+ "</>",
+ "<font_size=36 font=SLP:style=Bold style=shadow shadow_color=#000000bf color=#ffffffff align=left>",
+ bf2, "</>");
+ break;
+ case PHONE_LOCK_VIEW_ALIGN_CENTER:
+ snprintf(buf, sizeof(buf), "%s%d%s%s %s%s%s",
+ "<font_size=150 font=SLP:style=Light style=shadow shadow_color=#000000bf color=#ffffffff align=center>",
+ hour, bf1,
+ "</>",
+ "<font_size=36 font=SLP:style=Bold style=shadow shadow_color=#000000bf color=#ffffffff align=center>",
+ bf2, "</>");
+ break;
+ case PHONE_LOCK_VIEW_ALIGN_RIGHT:
+ snprintf(buf, sizeof(buf), "%s%d%s%s %s%s%s",
+ "<font_size=150 font=SLP:style=Light style=shadow shadow_color=#000000bf color=#ffffffff align=right>",
+ hour, bf1,
+ "</>",
+ "<font_size=36 font=SLP:style=Bold style=shadow shadow_color=#000000bf color=#ffffffff align=right>",
+ bf2, "</>");
+ break;
+ }
+ PHONE_LOCK_DBG("buf = %s", buf);
+ }
+
+ time_label = elm_label_add(info);
+ elm_object_text_set(time_label, buf);
+ elm_object_part_content_set(info, "label.time", time_label);
+
+ 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;
+
+ /* set UDate from time_t */
+ date = (UDate) tt *1000;
+
+ /* get default locale */
+ uloc_setDefault(__secure_getenv("LC_TIME"), &status); /* for thread saftey */
+ locale = uloc_getDefault();
+
+ /* open datetime pattern generator */
+ generator = udatpg_open(locale, &status);
+ if (generator == NULL)
+ return 0;
+
+ /* calculate pattern string capacity */
+ patternCapacity = (int32_t) (sizeof(pattern) / sizeof((pattern)[0]));
+
+ /* ascii to unicode for input skeleton */
+ u_uastrcpy(skeleton, customSkeleton);
+
+ /* get skeleton length */
+ skeletonLength = strlen(customSkeleton);
+
+ /* get best pattern using skeleton */
+ patternLength =
+ udatpg_getBestPattern(generator, skeleton, skeletonLength, pattern,
+ patternCapacity, &status);
+
+ /* open datetime formatter using best pattern */
+ formatter =
+ udat_open(UDAT_IGNORE, UDAT_DEFAULT, locale, NULL, -1, pattern,
+ patternLength, &status);
+ if (formatter == NULL) {
+ udatpg_close(generator);
+ }
+
+ /* calculate formatted string capacity */
+ formattedCapacity =
+ (int32_t) (sizeof(formatted) / sizeof((formatted)[0]));
+
+ /* formatting date using formatter by best pattern */
+ formattedLength =
+ udat_format(formatter, date, formatted, formattedCapacity, NULL,
+ &status);
+
+ /* unicode to ascii to display */
+ u_austrcpy(bf1, formatted);
+ PHONE_LOCK_DBG("formatted string=%s", bf1);
+
+ /* close datetime pattern generator */
+ udatpg_close(generator);
+
+ /* close datetime formatter */
+ udat_close(formatter);
+
+ switch (phone_lock_view_data->align_type) {
+ case PHONE_LOCK_VIEW_ALIGN_LEFT:
+ snprintf(buf, sizeof(buf), "%s%s%s",
+ "<font_size=45 font=SLP:style=Light style=shadow shadow_color=#000000bf color=#ffffffff align=left>",
+ bf1, "</>");
+ break;
+ case PHONE_LOCK_VIEW_ALIGN_CENTER:
+ snprintf(buf, sizeof(buf), "%s%s%s",
+ "<font_size=45 font=SLP:style=Light style=shadow shadow_color=#000000bf color=#ffffffff align=center>",
+ bf1, "</>");
+ break;
+ case PHONE_LOCK_VIEW_ALIGN_RIGHT:
+ snprintf(buf, sizeof(buf), "%s%s%s",
+ "<font_size=45 font=SLP:style=Light style=shadow shadow_color=#000000bf color=#ffffffff align=right>",
+ bf1, "</>");
+ break;
+ }
+
+ PHONE_LOCK_DBG("buf = %s", buf);
+
+ date_label = elm_label_add(info);
+ elm_object_text_set(date_label, buf);
+ elm_object_part_content_set(info, "label.date", date_label);
+
+ evas_object_show(time_label);
+ evas_object_show(date_label);
+
+ return 0;
+}
+
+static void
+_phone_lock_view_set_info(phone_lock_view_data_t * phone_lock_view_data)
+{
+ Evas_Object *bg = NULL;
+ Evas_Object *info = NULL;
+
+ if (!phone_lock_view_data) {
+ return;
+ }
+ PHONE_LOCK_DBG("");
+
+ bg = phone_lock_view_data->background;
+
+ if (!bg) {
+ return;
+ }
+ _phone_lock_view_set_info_time(phone_lock_view_data);
+
+ info = phone_lock_view_data->info;
+
+ if (!info) {
+ return;
+ }
+ elm_object_part_content_set(bg, "swallow.info.2", info);
+}
+
+static void _phone_lock_view_wakeup_cb(void *data)
+{
+ phone_lock_view_data_t *phone_lock_view_data = NULL;
+ PHONE_LOCK_DBG("%s %d", __FUNCTION__, __LINE__);
+
+ phone_lock_view_data = (phone_lock_view_data_t *) data;
+
+ if (phone_lock_view_data)
+ _phone_lock_view_set_info_time(phone_lock_view_data);
+}
+
+static int _phone_lock_view_init_heynoti(phone_lock_view_data_t * phone_lock_view_data)
+{
+ int fd = 0, ret = -1;
+ PHONE_LOCK_DBG("%s %d", __FUNCTION__, __LINE__);
+
+ fd = heynoti_init();
+ if (fd == -1) {
+ PHONE_LOCK_ERR("Noti init error\n");
+ return -1;
+ }
+
+ ret = heynoti_subscribe(fd, SYSTEM_RESUME, _phone_lock_view_wakeup_cb, phone_lock_view_data);
+ if (ret) {
+ PHONE_LOCK_ERR
+ ("[Error] heynoti_subscribe : system_wakeup\n");
+ return -1;
+ }
+
+ ret = heynoti_attach_handler(fd);
+ if (ret) {
+ PHONE_LOCK_ERR
+ ("[Error] heynoti_attach_handler failed.\n");
+ return -1;
+ }
+
+ phone_lock_view_data->heynoti_fd = fd;
+
+ return EXIT_SUCCESS;
+}
+
+static void _phone_lock_fini_heynoti(phone_lock_view_data_t * phone_lock_view_data)
+{
+ PHONE_LOCK_DBG("%s %d", __FUNCTION__, __LINE__);
+ heynoti_unsubscribe(phone_lock_view_data->heynoti_fd, SYSTEM_RESUME, _phone_lock_view_wakeup_cb);
+
+ heynoti_close(phone_lock_view_data->heynoti_fd);
+
+ phone_lock_view_data->heynoti_fd = 0;
+}
+
+static void
+_phone_lock_view_create_info(phone_lock_view_data_t * phone_lock_view_data)
+{
+ Evas_Object *bg = NULL;
+ Evas_Object *info = NULL;
+
+ if (!phone_lock_view_data) {
+ return;
+ }
+ PHONE_LOCK_DBG("");
+
+ bg = phone_lock_view_data->background;
+
+ if (!bg) {
+ return;
+ }
+
+ info = _phone_lock_view_create_layout(bg, EDJ_PHONE_LOCK_VIEW,
+ "phlock.view.info");
+ if (info == NULL) {
+ PHONE_LOCK_ERR("[Error] Cannot add layout: info\n");
+ return;
+ }
+
+ if (_phone_lock_view_init_heynoti(phone_lock_view_data) < 0) {
+ PHONE_LOCK_ERR("heynoti ERR..!!");
+ }
+
+ phone_lock_view_data->info = info;
+ _phone_lock_view_set_info(phone_lock_view_data);
+
+ evas_object_show(phone_lock_view_data->info);
+}
+
+static void _phone_lock_view_set_color_start(int count, int r, int g, int b,
+ int a)
+{
+ int i = 0;
+ for (i = count; i < 6; i++) {
+ evas_object_color_set(arrow_icon[i], r, g, b, a);
+ }
+}
+
+static void _phone_lock_view_set_color_index(int index, int r, int g, int b,
+ int a)
+{
+
+ evas_object_color_set(arrow_icon[index], r, g, b, a);
+}
+
+static void _phone_lock_view_arrow_down_cb(void *data, Evas * evas,
+ Evas_Object * obj, void *event_info)
+{
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+
+ if (phone_lock_view_data == NULL) {
+ return;
+ }
+ PHONE_LOCK_DBG("_phone_lock_view_arrow_down_cb");
+ Evas_Event_Mouse_Down *ev = event_info;
+ start_pos = ev->canvas.x;
+ PHONE_LOCK_DBG("_phone_lock_view_arrow_down_cb start_pos = %d",
+ start_pos);
+}
+
+static void _phone_lock_view_arrow_up_cb(void *data, Evas * evas,
+ Evas_Object * obj, void *event_info)
+{
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+
+ if (phone_lock_view_data == NULL) {
+ return;
+ }
+ PHONE_LOCK_DBG("_phone_lock_view_arrow_up_cb");
+
+ Evas_Event_Mouse_Down *ev = event_info;
+ if ((ev->canvas.x - start_pos) > 440 * (phone_lock_view_data->scale)) {
+ phone_lock_view_hide_imf_context_input_panel
+ (phone_lock_view_data);
+ if (phone_lock_view_data->func) {
+ phone_lock_view_data->is_callug_launched = EINA_TRUE;
+ phone_lock_view_data->func(1, NULL,
+ phone_lock_view_data->user_data);
+ }
+ } else {
+ }
+ _phone_lock_view_set_color_start(0, 255, 255, 255, 255);
+}
+
+static void _phone_lock_view_arrow_move_cb(void *data, Evas * evas,
+ Evas_Object * obj, void *event_info)
+{
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+
+ if (phone_lock_view_data == NULL) {
+ return;
+ }
+ PHONE_LOCK_DBG("_phone_lock_view_arrow_move_cb");
+ PHONE_LOCK_DBG
+ ("_phone_lock_view_arrow_move_cb: phone_lock_view_data->scale = %f",
+ phone_lock_view_data->scale);
+ Evas_Event_Mouse_Down *ev = event_info;
+ if (ev->canvas.x <= 96 * (phone_lock_view_data->scale)) {
+ _phone_lock_view_set_color_start(0, 255, 255, 255, 255);
+ } else if (ev->canvas.x > 96 * (phone_lock_view_data->scale)
+ && ev->canvas.x <= 184 * (phone_lock_view_data->scale)) {
+ _phone_lock_view_set_color_start(0, 255, 255, 255, 255);
+ _phone_lock_view_set_color_index(0, 0, 191, 255, 255);
+ } else if (ev->canvas.x > 184 * (phone_lock_view_data->scale)
+ && ev->canvas.x <= 272 * (phone_lock_view_data->scale)) {
+ _phone_lock_view_set_color_start(1, 255, 255, 255, 255);
+ _phone_lock_view_set_color_index(1, 0, 191, 255, 255);
+ } else if (ev->canvas.x > 272 * (phone_lock_view_data->scale)
+ && ev->canvas.x <= 360 * (phone_lock_view_data->scale)) {
+ _phone_lock_view_set_color_start(2, 255, 255, 255, 255);
+ _phone_lock_view_set_color_index(2, 0, 191, 255, 255);
+ } else if (ev->canvas.x > 360 * (phone_lock_view_data->scale)
+ && ev->canvas.x <= 448 * (phone_lock_view_data->scale)) {
+ _phone_lock_view_set_color_start(3, 255, 255, 255, 255);
+ _phone_lock_view_set_color_index(3, 0, 191, 255, 255);
+ } else if (ev->canvas.x > 448 * (phone_lock_view_data->scale)
+ && ev->canvas.x <= 536 * (phone_lock_view_data->scale)) {
+ _phone_lock_view_set_color_start(4, 255, 255, 255, 255);
+ _phone_lock_view_set_color_index(4, 0, 191, 255, 255);
+ } else if (ev->canvas.x > 536 * (phone_lock_view_data->scale)) {
+ _phone_lock_view_set_color_start(5, 255, 255, 255, 255);
+ _phone_lock_view_set_color_index(5, 0, 191, 255, 255);
+ }
+}
+
+static void
+_phone_lock_view_create_emergency_event(phone_lock_view_data_t *
+ phone_lock_view_data)
+{
+ Evas_Object *event = NULL;
+ Evas_Object *bg = NULL;
+ Evas_Object *emergency_icon = NULL;
+ Evas_Object *emergency_text = NULL;
+ char buf[512] = { 0, };
+ int i = 0;
+ /* create dragable */
+ event =
+ _phone_lock_view_create_layout(phone_lock_view_data->layout_main,
+ EDJ_PHONE_LOCK_VIEW,
+ "phlock.view.event");
+ if (event == NULL) {
+ PHONE_LOCK_ERR("[Error] Cannot add layout: event\n");
+ return;
+ }
+
+ phone_lock_view_data->event = event;
+ bg = phone_lock_view_data->background;
+
+ for (i = 0; i < 6; i++) {
+ if (arrow_icon[i]) {
+ evas_object_del(arrow_icon[i]);
+ arrow_icon[i] = NULL;
+ }
+ arrow_icon[i] = elm_image_add(bg);
+ elm_image_file_set(arrow_icon[i],
+ PHONE_LOCK_VIEW_ARROW_DEFAULT_IMG, NULL);
+ snprintf(buf, sizeof(buf), "%s%d", "arrow_icon_", i);
+ elm_object_part_content_set(event, buf, arrow_icon[i]);
+ evas_object_show(arrow_icon[i]);
+ }
+
+ emergency_icon = elm_image_add(bg);
+ elm_image_file_set(emergency_icon, PHONE_LOCK_VIEW_EMERGENCY_CALL_IMG,
+ NULL);
+ elm_object_part_content_set(event, "emergency_icon", emergency_icon);
+ evas_object_show(emergency_icon);
+
+ emergency_text = elm_label_add(bg);
+ snprintf(buf, sizeof(buf), "%s%s%s",
+ "<font_size=25 font=SLP:style=Light style=shadow shadow_color=#000000bf color=#ffffffff>",
+ phone_lock_get_string(IDS_IDLE_BODY_EMERGENCY_CALL), "</>");
+ PHONE_LOCK_DBG("buf = %s", buf);
+ elm_object_text_set(emergency_text, buf);
+ elm_object_part_content_set(event, "emergency_text", emergency_text);
+
+ evas_object_show(emergency_text);
+
+ evas_object_event_callback_add(event, EVAS_CALLBACK_MOUSE_MOVE,
+ _phone_lock_view_arrow_move_cb,
+ phone_lock_view_data);
+ evas_object_event_callback_add(event, EVAS_CALLBACK_MOUSE_DOWN,
+ _phone_lock_view_arrow_down_cb,
+ phone_lock_view_data);
+ evas_object_event_callback_add(event, EVAS_CALLBACK_MOUSE_UP,
+ _phone_lock_view_arrow_up_cb,
+ phone_lock_view_data);
+ evas_object_show(event);
+ elm_object_part_content_set(bg, "swallow.event.down", event);
+}
+
+static void
+_phone_lock_view_entry_changed_cb(void *data, Evas_Object * obj,
+ void *event_info)
+{
+ PHONE_LOCK_DBG("");
+}
+
+static void
+_phone_lock_view_entry_activated_cb(void *data, Evas_Object * obj,
+ void *event_info)
+{
+ PHONE_LOCK_DBG("enter key clicked!!\n");
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+
+ if (phone_lock_view_data == NULL) {
+ return;
+ }
+
+ phone_lock_view_data->is_customedentry_clicked = EINA_TRUE;
+}
+
+static void
+_phone_lock_view_input_panel_event_cb(void *data,
+ Ecore_IMF_Context * imf_context,
+ int value)
+{
+ PHONE_LOCK_DBG("");
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+
+ if (phone_lock_view_data == NULL) {
+ return;
+ }
+
+ Evas_Coord x;
+ Evas_Coord y;
+ Evas_Coord w;
+ Evas_Coord h;
+ double dx;
+ double dy;
+ switch (value) {
+ case ECORE_IMF_INPUT_PANEL_STATE_SHOW:
+ /* Move up emergency object */
+ evas_object_geometry_get(phone_lock_view_data->event, &x, &y,
+ &w, &h);
+ PHONE_LOCK_DBG("y = %d", y);
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->background),
+ "bg.up", "swallow.event.bg");
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->background),
+ "bg.up", "swallow.event");
+ elm_object_part_content_unset(phone_lock_view_data->background,
+ "swallow.event.down");
+ elm_object_part_content_set(phone_lock_view_data->background,
+ "swallow.event.up",
+ phone_lock_view_data->event);
+
+ break;
+ case ECORE_IMF_INPUT_PANEL_STATE_HIDE:
+ /* Move down Emergency call event if current focus is not emergency call */
+ edje_object_part_drag_value_get(_EDJ
+ (phone_lock_view_data->event),
+ "sw.slider", &dx, &dy);
+ evas_object_geometry_get(phone_lock_view_data->event, &x, &y,
+ &w, &h);
+ PHONE_LOCK_DBG("dx= %f", dx);
+ PHONE_LOCK_DBG("y = %d", y);
+
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->background),
+ "bg.down", "swallow.event.bg");
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->background),
+ "bg.down", "swallow.event");
+ elm_object_part_content_unset(phone_lock_view_data->background,
+ "swallow.event.up");
+ elm_object_part_content_set(phone_lock_view_data->background,
+ "swallow.event.down",
+ phone_lock_view_data->event);
+
+ break;
+ default:
+ break;
+ }
+}
+
+static void _phone_lock_view_button_up_cb(void *data, Evas_Object * obj,
+ const char *emission,
+ const char *source)
+{
+ PHONE_LOCK_DBG("");
+
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+
+ if (NULL == phone_lock_view_data) {
+ return;
+ }
+
+ edje_object_signal_emit(elm_layout_edje_get
+ (phone_lock_view_data->input), "release",
+ "button");
+
+ phone_lock_view_hide_imf_context_input_panel(phone_lock_view_data);
+
+ if (phone_lock_view_data->func) {
+ _phone_lock_view_set_str(&phone_lock_view_data->contents,
+ elm_entry_entry_get
+ (phone_lock_view_data->input_entry));
+ PHONE_LOCK_DBG("%s, phone_lock_view_data->contents : %s",
+ __FUNCTION__, phone_lock_view_data->contents);
+ phone_lock_view_data->func(2, phone_lock_view_data->contents,
+ phone_lock_view_data->user_data);
+ }
+}
+
+static void _phone_lock_view_button_down_cb(void *data, Evas_Object * obj,
+ const char *emission,
+ const char *source)
+{
+ PHONE_LOCK_DBG("");
+
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+
+ if (NULL == phone_lock_view_data) {
+ return;
+ }
+
+ edje_object_signal_emit(elm_layout_edje_get
+ (phone_lock_view_data->input), "press",
+ "button");
+}
+
+static void _phone_lock_view_create_customed_entry(void *data)
+{
+ Evas_Object *entry = NULL;
+ Evas_Object *input = NULL;
+ Evas_Object *background = NULL;
+
+ static Elm_Entry_Filter_Limit_Size limit_filter_data_alpha;
+
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+
+ if (phone_lock_view_data == NULL) {
+ return;
+ }
+
+ background = phone_lock_view_data->background;
+ input = phone_lock_view_data->input;
+
+ entry = elm_entry_add(background);
+
+ Elm_Theme *th = elm_theme_new();
+ elm_theme_ref_set(th, NULL);
+ elm_theme_extension_add(th, EDJ_PHONE_LOCK_VIEW_ENTRY);
+
+ elm_object_theme_set(entry, th);
+ elm_object_style_set(entry, "phone_lock_alpha_style");
+
+ limit_filter_data_alpha.max_char_count =
+ PHONE_LOCK_VIEW_PHONE_LOCK_MAX_LENGTH;
+ limit_filter_data_alpha.max_byte_count = 0;
+ elm_entry_markup_filter_append(entry, elm_entry_filter_limit_size,
+ &limit_filter_data_alpha);
+
+ elm_entry_single_line_set(entry, EINA_TRUE);
+ elm_entry_password_set(entry, EINA_TRUE);
+ elm_entry_entry_set(entry, "");
+ elm_entry_cursor_end_set(entry);
+ elm_object_part_content_set(input, "swallow.text", entry);
+
+ Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(entry);
+ ecore_imf_context_input_panel_event_callback_add(imf_context,
+ ECORE_IMF_INPUT_PANEL_STATE_EVENT,
+ _phone_lock_view_input_panel_event_cb,
+ phone_lock_view_data);
+ ecore_imf_context_input_panel_language_set(imf_context,
+ ECORE_IMF_INPUT_PANEL_LANG_ALPHABET);
+
+ phone_lock_view_data->input_entry = entry;
+ phone_lock_view_data->theme = th;
+ phone_lock_view_data->is_customedentry_clicked = EINA_FALSE;
+}
+
+static void _phone_lock_view_destroy_customed_entry(void *data)
+{
+ Evas_Object *entry = NULL;
+ Evas_Object *input = NULL;
+ Elm_Theme *th = NULL;
+
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+
+ if (phone_lock_view_data == NULL) {
+ return;
+ }
+
+ input = phone_lock_view_data->input;
+ entry = phone_lock_view_data->input_entry;
+ th = phone_lock_view_data->theme;
+
+ elm_object_part_content_unset(input, "swallow.text");
+
+ if (entry) {
+ evas_object_del(entry);
+ entry = NULL;
+ }
+ if (th) {
+ elm_theme_free(th);
+ th = NULL;
+ }
+}
+
+static void _phone_lock_view_enable_phone_lock(void *data)
+{
+ Evas_Object *label = NULL;
+ Evas_Object *entry = NULL;
+ Evas_Object *input = NULL;
+ Evas_Object *background = NULL;
+ char buf[256] = { 0, };
+
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+
+ if (phone_lock_view_data == NULL) {
+ return;
+ }
+
+ label = phone_lock_view_data->title_label;
+ entry = phone_lock_view_data->input_entry;
+ input = phone_lock_view_data->input;
+ background = phone_lock_view_data->background;
+
+ snprintf(buf, sizeof(buf), "%s%s%s",
+ "<font_size=62 font=SLP:style=Light style=shadow shadow_color=#000000bf color=#ffffff align=center>",
+ phone_lock_get_string(IDS_COM_BODY_ENTER_PASSWORD), "</>");
+ elm_object_text_set(label, buf);
+ elm_object_part_content_set(background, "swallow.input", input);
+ evas_object_smart_callback_add(entry, "changed",
+ _phone_lock_view_entry_changed_cb, NULL);
+ evas_object_smart_callback_add(entry, "focused",
+ _phone_lock_view_entry_activated_cb,
+ phone_lock_view_data);
+ evas_object_show(input);
+}
+
+static void _phone_lock_view_disable_phone_lock(void *data)
+{
+ Evas_Object *label = NULL;
+ Evas_Object *entry = NULL;
+ Evas_Object *input = NULL;
+ Evas_Object *background = NULL;
+ char buf[256] = { 0, };
+ char buf_str[50] = { 0, };
+ PHONE_LOCK_DBG("%s", __FUNCTION__);
+
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+
+ if (phone_lock_view_data == NULL) {
+ return;
+ }
+
+ label = phone_lock_view_data->title_label;
+ entry = phone_lock_view_data->input_entry;
+ input = phone_lock_view_data->input;
+ background = phone_lock_view_data->background;
+ snprintf(buf_str, sizeof(buf_str),
+ phone_lock_get_string(IDS_IDLE_BODY_TRY_LATER),
+ phone_lock_view_data->block_seconds);
+ snprintf(buf, sizeof(buf), "%s%s%s",
+ "<font_size=62 font=SLP:style=Light style=shadow shadow_color=#000000bf color=#ffffff align=center>",
+ buf_str, "</>");
+ elm_object_text_set(label, buf);
+
+ elm_object_part_content_unset(background, "swallow.input");
+ evas_object_hide(input);
+
+ evas_object_smart_callback_del(entry, "changed",
+ _phone_lock_view_entry_changed_cb);
+ evas_object_smart_callback_del(entry, "focused",
+ _phone_lock_view_entry_activated_cb);
+
+ ecore_timer_thaw(phone_lock_view_data->phone_lock_timer);
+}
+
+static void _phone_lock_view_enable_simple_phone_lock(void *data)
+{
+ Evas_Object *label = NULL;
+ Evas_Object *label1 = NULL;
+ Evas_Object *label2 = NULL;
+ Evas_Object *label3 = NULL;
+ Evas_Object *label4 = NULL;
+ Evas_Object *input = NULL;
+ Evas_Object *background = NULL;
+ char buf[256] = { 0, };
+
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+
+ if (phone_lock_view_data == NULL) {
+ return;
+ }
+
+ label = phone_lock_view_data->title_label;
+ label1 = phone_lock_view_data->sp_label1;
+ label2 = phone_lock_view_data->sp_label2;
+ label3 = phone_lock_view_data->sp_label3;
+ label4 = phone_lock_view_data->sp_label4;
+ input = phone_lock_view_data->input;
+ background = phone_lock_view_data->background;
+
+ snprintf(buf, sizeof(buf), "%s%s%s",
+ "<font_size=62 font=SLP:style=Light style=shadow shadow_color=#000000bf color=#ffffff align=center>",
+ phone_lock_get_string(IDS_COM_BODY_ENTER_PASSWORD), "</>");
+ elm_object_text_set(label, buf);
+ elm_object_text_set(label1, "");
+ elm_object_text_set(label2, "");
+ elm_object_text_set(label3, "");
+ elm_object_text_set(label4, "");
+ elm_object_part_content_set(background, "swallow.input", input);
+ evas_object_show(input);
+}
+
+static void _phone_lock_view_disable_simple_phone_lock(void *data)
+{
+ Evas_Object *label = NULL;
+ Evas_Object *input = NULL;
+ Evas_Object *background = NULL;
+ char buf[256] = { 0, };
+ char buf_str[50] = { 0, };
+ PHONE_LOCK_DBG("%s", __FUNCTION__);
+
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+
+ if (phone_lock_view_data == NULL) {
+ return;
+ }
+
+ label = phone_lock_view_data->title_label;
+ input = phone_lock_view_data->input;
+ background = phone_lock_view_data->background;
+ snprintf(buf_str, sizeof(buf_str),
+ phone_lock_get_string(IDS_IDLE_BODY_TRY_LATER),
+ phone_lock_view_data->block_seconds);
+ snprintf(buf, sizeof(buf), "%s%s%s",
+ "<font_size=62 font=SLP:style=Light style=shadow shadow_color=#000000bf color=#ffffff align=center>",
+ buf_str, "</>");
+ elm_object_text_set(label, buf);
+
+ elm_object_part_content_unset(background, "swallow.input");
+ evas_object_hide(input);
+ ecore_timer_thaw(phone_lock_view_data->phone_lock_timer);
+}
+
+static Eina_Bool _phone_lock_view_update_phone_lock_cb(void *data)
+{
+ _phone_lock_view_update_phone_lock(data);
+ return EINA_TRUE;
+}
+
+static void _phone_lock_view_update_phone_lock(void *data)
+{
+ int value = -1;
+ int ret = 0;
+
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+
+ if (phone_lock_view_data == NULL) {
+ return;
+ }
+ PHONE_LOCK_DBG("%s", __FUNCTION__);
+
+ ret =
+ vconf_get_int(VCONFKEY_SETAPPL_PHONE_LOCK_ATTEMPTS_LEFT_INT,
+ &value);
+
+ if (ret != 0) {
+ return;
+ }
+
+ if (value == 0) {
+ char timestamp_str
+ [PHONE_LOCK_VIEW_PHONE_LOCK_TIMESTAMP_STR_LENGTH + 1] =
+ { 0, };
+ char *temp = NULL;
+ int length = 0;
+ int temp_length = 0;
+ temp = vconf_get_str(VCONFKEY_SETAPPL_PHONE_LOCK_TIMESTAMP_STR);
+ temp_length = strlen(temp);
+ length =
+ (temp_length <=
+ PHONE_LOCK_VIEW_PHONE_LOCK_TIMESTAMP_STR_LENGTH) ?
+ temp_length :
+ PHONE_LOCK_VIEW_PHONE_LOCK_TIMESTAMP_STR_LENGTH;
+ strncpy(timestamp_str, temp, length);
+ timestamp_str[length] = '\0';
+ if ((strcmp(timestamp_str, "") != 0)
+ || (strlen(timestamp_str) != 0)) {
+ time_t cur_time = time(NULL);
+ time_t last_lock_time;
+ sscanf(timestamp_str, "%ld", &last_lock_time);
+
+ if ((cur_time - last_lock_time) <
+ PHONE_LOCK_VIEW_PHONE_LOCK_BLOCK_SECONDS) {
+ phone_lock_view_data->block_seconds =
+ PHONE_LOCK_VIEW_PHONE_LOCK_BLOCK_SECONDS -
+ (cur_time - last_lock_time);
+ PHONE_LOCK_DBG
+ ("phone_lock_view_data->block_seconds = %d",
+ phone_lock_view_data->block_seconds);
+ phone_lock_view_data->view_disabled = 1;
+ switch (phone_lock_view_data->lock_type) {
+ case PHONE_LOCK_VIEW_COMPLEX_PHONE_LOCK:
+ _phone_lock_view_disable_phone_lock
+ (phone_lock_view_data);
+ break;
+ case PHONE_LOCK_VIEW_SIMPLE_PHONE_LOCK:
+ _phone_lock_view_disable_simple_phone_lock(phone_lock_view_data);
+ break;
+ default:
+ break;
+ }
+ } else {
+ phone_lock_view_data->view_disabled = 0;
+ vconf_set_int
+ (VCONFKEY_SETAPPL_PHONE_LOCK_ATTEMPTS_LEFT_INT,
+ PHONE_LOCK_VIEW_PHONE_LOCK_ATTEMPTS_MAX);
+
+ PHONE_LOCK_DBG
+ ("phone_lock_view_data->view_disabled = %d",
+ phone_lock_view_data->view_disabled);
+ switch (phone_lock_view_data->lock_type) {
+ case PHONE_LOCK_VIEW_COMPLEX_PHONE_LOCK:
+ _phone_lock_view_destroy_customed_entry
+ (phone_lock_view_data);
+ _phone_lock_view_create_customed_entry
+ (phone_lock_view_data);
+ _phone_lock_view_enable_phone_lock
+ (phone_lock_view_data);
+ break;
+ case PHONE_LOCK_VIEW_SIMPLE_PHONE_LOCK:
+ _phone_lock_view_enable_simple_phone_lock(phone_lock_view_data);
+ if (phone_lock_view_data->is_callug_launched == EINA_FALSE) {
+ phone_lock_view_show_imf_context_input_panel
+ (phone_lock_view_data);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
+}
+
+static void _phone_lock_view_check_vconf_value(void *data)
+{
+ int phone_lock_value = -1;
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+
+ if (phone_lock_view_data == NULL) {
+ return;
+ }
+ PHONE_LOCK_DBG("%s", __FUNCTION__);
+
+ vconf_get_int(VCONFKEY_SETAPPL_PHONE_LOCK_ATTEMPTS_LEFT_INT,
+ &phone_lock_value);
+
+ if (phone_lock_value == 0) {
+ if (phone_lock_view_data->phone_lock_timer) {
+ return;
+ }
+ phone_lock_view_data->phone_lock_timer =
+ ecore_timer_add(1, (Ecore_Task_Cb)
+ _phone_lock_view_update_phone_lock_cb,
+ phone_lock_view_data);
+ } else {
+ if (phone_lock_view_data->phone_lock_timer) {
+ ecore_timer_del(phone_lock_view_data->phone_lock_timer);
+ phone_lock_view_data->phone_lock_timer = NULL;
+ }
+ phone_lock_view_data->view_disabled = 0;
+ switch (phone_lock_view_data->lock_type) {
+ case PHONE_LOCK_VIEW_COMPLEX_PHONE_LOCK:
+ _phone_lock_view_enable_phone_lock
+ (phone_lock_view_data);
+ break;
+ case PHONE_LOCK_VIEW_SIMPLE_PHONE_LOCK:
+ _phone_lock_view_enable_simple_phone_lock
+ (phone_lock_view_data);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+static void _phone_lock_view_check_vconf_value_cb(keynode_t * key, void *data)
+{
+ _phone_lock_view_check_vconf_value(data);
+}
+
+static void _phone_lock_view_clear_entry_contents(void *data)
+{
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+
+ if (phone_lock_view_data == NULL) {
+ return;
+ }
+
+ PHONE_LOCK_DBG("%s", __FUNCTION__);
+
+ switch (phone_lock_view_data->lock_type) {
+ case PHONE_LOCK_VIEW_COMPLEX_PHONE_LOCK:
+ PHONE_LOCK_DBG("Clear the complex pw's entry.");
+ if (phone_lock_view_data->input_entry) {
+ elm_entry_entry_set
+ (phone_lock_view_data->input_entry, "");
+ }
+ break;
+ case PHONE_LOCK_VIEW_SIMPLE_PHONE_LOCK:
+ PHONE_LOCK_DBG("Clear the simple pw's entry.");
+ if (phone_lock_view_data->editfield_layout) {
+ elm_entry_entry_set(_phone_lock_view_editfield_entry_get
+ (phone_lock_view_data->editfield_layout),
+ "");
+ }
+ phone_lock_view_data->is_simple_pw_checking = EINA_FALSE;
+ break;
+ }
+}
+
+/* reset: clear entry and hide keypad */
+static void _phone_lock_view_notify_pm_state_cb(keynode_t * key, void *data)
+{
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+ int val = -1;
+
+ if (phone_lock_view_data == NULL) {
+ return;
+ }
+
+ PHONE_LOCK_DBG("%s", __FUNCTION__);
+
+ if (vconf_get_int(VCONFKEY_PM_STATE, &val) < 0) {
+ PHONE_LOCK_ERR("Cannot get VCONFKEY_PM_STATE");
+ return;
+ }
+
+ if (val == VCONFKEY_PM_STATE_LCDOFF) {
+ _phone_lock_view_clear_entry_contents(phone_lock_view_data);
+ phone_lock_view_hide_imf_context_input_panel
+ (phone_lock_view_data);
+ }
+}
+
+void
+_phone_lock_view_create_alpha_view_complex_lock(phone_lock_view_data_t *
+ phone_lock_view_data)
+{
+ Evas_Object *background = NULL;
+ Evas_Object *label = NULL;
+ Evas_Object *title_label = NULL;
+ Evas_Object *input = NULL;
+ Evas_Object *entry = NULL;
+ char buf[256] = { 0, };
+ static Elm_Entry_Filter_Limit_Size limit_filter_data_alpha;
+
+ background =
+ _phone_lock_view_create_layout(phone_lock_view_data->layout_main,
+ EDJ_PHONE_LOCK_VIEW,
+ "phlock.view.main");
+
+ evas_object_resize(background, phone_lock_view_data->win_w,
+ phone_lock_view_data->win_h);
+ evas_object_show(background);
+
+ _phone_lock_view_create_bg_image(background);
+
+ title_label = elm_label_add(background);
+ elm_object_part_content_set(background, "swallow.title", title_label);
+
+ evas_object_show(title_label);
+ input =
+ _phone_lock_view_create_layout(background, EDJ_PHONE_LOCK_VIEW,
+ "phlock.view.input.complex");
+
+ entry = elm_entry_add(background);
+
+ Elm_Theme *th = elm_theme_new();
+ elm_theme_ref_set(th, NULL);
+ elm_theme_extension_add(th, EDJ_PHONE_LOCK_VIEW_ENTRY);
+
+ elm_object_theme_set(entry, th);
+ elm_object_style_set(entry, "phone_lock_alpha_style");
+
+ limit_filter_data_alpha.max_char_count =
+ PHONE_LOCK_VIEW_PHONE_LOCK_MAX_LENGTH;
+ limit_filter_data_alpha.max_byte_count = 0;
+ elm_entry_markup_filter_append(entry, elm_entry_filter_limit_size,
+ &limit_filter_data_alpha);
+
+ elm_entry_single_line_set(entry, EINA_TRUE);
+ elm_entry_password_set(entry, EINA_TRUE);
+ elm_entry_entry_set(entry, "");
+ elm_entry_cursor_end_set(entry);
+ elm_object_part_content_set(input, "swallow.text", entry);
+
+ Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(entry);
+ ecore_imf_context_input_panel_event_callback_add(imf_context,
+ ECORE_IMF_INPUT_PANEL_STATE_EVENT,
+ _phone_lock_view_input_panel_event_cb,
+ phone_lock_view_data);
+ ecore_imf_context_input_panel_language_set(imf_context,
+ ECORE_IMF_INPUT_PANEL_LANG_ALPHABET);
+
+ label = elm_label_add(background);
+
+ snprintf(buf, sizeof(buf), "%s%s%s",
+ "<font_size=34 font=SLP:style=Roman color=#ffffff align=center>",
+ phone_lock_get_string(IDS_COM_SK_OK), "</>");
+ elm_object_text_set(label, buf);
+ elm_object_part_content_set(input, "swallow.button", label);
+
+ evas_object_show(label);
+
+ edje_object_signal_callback_add(_EDJ(input), "mouse,up,1", "button",
+ _phone_lock_view_button_up_cb,
+ phone_lock_view_data);
+ edje_object_signal_callback_add(_EDJ(input), "mouse,down,1", "button",
+ _phone_lock_view_button_down_cb,
+ phone_lock_view_data);
+
+ phone_lock_view_data->background = background;
+ phone_lock_view_data->input_label = label;
+ phone_lock_view_data->title_label = title_label;
+ phone_lock_view_data->input_entry = entry;
+ phone_lock_view_data->input = input;
+ phone_lock_view_data->theme = th;
+
+ _phone_lock_view_create_emergency_event(phone_lock_view_data);
+ _phone_lock_view_create_info(phone_lock_view_data);
+ _phone_lock_view_update_phone_lock(phone_lock_view_data);
+ vconf_notify_key_changed
+ (VCONFKEY_SETAPPL_PHONE_LOCK_ATTEMPTS_LEFT_INT,
+ _phone_lock_view_check_vconf_value_cb, phone_lock_view_data);
+ vconf_notify_key_changed(VCONFKEY_PM_STATE,
+ _phone_lock_view_notify_pm_state_cb,
+ phone_lock_view_data);
+ _phone_lock_view_check_vconf_value(phone_lock_view_data);
+}
+
+static void _phone_lock_view_set_entry_bg_color(void *data)
+{
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+ char *s = NULL;
+ int length = 0;
+ Evas_Object *editfield_layout = NULL;
+
+ if (!phone_lock_view_data) {
+ return;
+ }
+ editfield_layout = phone_lock_view_data->editfield_layout;
+ if (editfield_layout) {
+ s = (char *)
+ elm_entry_entry_get(_phone_lock_view_editfield_entry_get
+ (editfield_layout));
+ }
+
+ PHONE_LOCK_DBG("%s s = %s", __FUNCTION__, s);
+ length = strlen(s);
+ switch (length) {
+ case 0:
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->input),
+ "sp1_bg_set_default", "sp1_bg");
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->input),
+ "sp2_bg_set_default", "sp2_bg");
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->input),
+ "sp3_bg_set_default", "sp3_bg");
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->input),
+ "sp4_bg_set_default", "sp4_bg");
+ break;
+ case 1:
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->input),
+ "sp1_bg_set_input", "sp1_bg");
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->input),
+ "sp2_bg_set_default", "sp2_bg");
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->input),
+ "sp3_bg_set_default", "sp3_bg");
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->input),
+ "sp4_bg_set_default", "sp4_bg");
+ break;
+ case 2:
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->input),
+ "sp1_bg_set_input", "sp1_bg");
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->input),
+ "sp2_bg_set_input", "sp2_bg");
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->input),
+ "sp3_bg_set_default", "sp3_bg");
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->input),
+ "sp4_bg_set_default", "sp4_bg");
+ break;
+ case 3:
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->input),
+ "sp1_bg_set_input", "sp1_bg");
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->input),
+ "sp2_bg_set_input", "sp2_bg");
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->input),
+ "sp3_bg_set_input", "sp3_bg");
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->input),
+ "sp4_bg_set_default", "sp4_bg");
+ break;
+ case 4:
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->input),
+ "sp1_bg_set_input", "sp1_bg");
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->input),
+ "sp2_bg_set_input", "sp2_bg");
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->input),
+ "sp3_bg_set_input", "sp3_bg");
+ edje_object_signal_emit(_EDJ(phone_lock_view_data->input),
+ "sp4_bg_set_input", "sp4_bg");
+ break;
+ }
+}
+
+static void _phone_lock_view_simple_entry_changed_cb(void *data,
+ Evas_Object * obj,
+ void *event_info)
+{
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+ char *s = NULL;
+ int length = 0;
+ Evas_Object *editfield_layout = NULL;
+ Evas_Object *label1 = NULL;
+ Evas_Object *label2 = NULL;
+ Evas_Object *label3 = NULL;
+ Evas_Object *label4 = NULL;
+ char buf[255] = { 0 };
+
+ if (!phone_lock_view_data) {
+ return;
+ }
+
+ if (phone_lock_view_data->is_simple_pw_checking == EINA_TRUE) {
+ return;
+ }
+ editfield_layout = phone_lock_view_data->editfield_layout;
+ if (obj) {
+ s = (char *)
+ elm_entry_entry_get(_phone_lock_view_editfield_entry_get
+ (editfield_layout));
+ }
+
+ if (elm_object_focus_get(editfield_layout)) {
+ if (elm_entry_is_empty
+ (_phone_lock_view_editfield_entry_get(editfield_layout))) {
+ elm_object_signal_emit(editfield_layout,
+ "elm,state,eraser,hide", "elm");
+ } else {
+ elm_object_signal_emit(editfield_layout,
+ "elm,state,eraser,show", "elm");
+ }
+ }
+
+ PHONE_LOCK_DBG("%s s = %s", __FUNCTION__, s);
+ length = strlen(s);
+ label1 = phone_lock_view_data->sp_label1;
+ label2 = phone_lock_view_data->sp_label2;
+ label3 = phone_lock_view_data->sp_label3;
+ label4 = phone_lock_view_data->sp_label4;
+ snprintf(buf, sizeof(buf), "%s%s%s",
+ "<font_size=70 font=SLP:style=Roman color=#ffffff align=center>",
+ "*", "</>");
+ switch (length) {
+ case 0:
+ elm_object_text_set(label1, "");
+ elm_object_text_set(label2, "");
+ elm_object_text_set(label3, "");
+ elm_object_text_set(label4, "");
+ break;
+ case 1:
+ elm_object_text_set(label1, buf);
+ elm_object_text_set(label2, "");
+ elm_object_text_set(label3, "");
+ elm_object_text_set(label4, "");
+ break;
+ case 2:
+ elm_object_text_set(label1, buf);
+ elm_object_text_set(label2, buf);
+ elm_object_text_set(label3, "");
+ elm_object_text_set(label4, "");
+ break;
+ case 3:
+ elm_object_text_set(label1, buf);
+ elm_object_text_set(label2, buf);
+ elm_object_text_set(label3, buf);
+ elm_object_text_set(label4, "");
+ break;
+ case 4:
+ elm_object_text_set(label1, buf);
+ elm_object_text_set(label2, buf);
+ elm_object_text_set(label3, buf);
+ elm_object_text_set(label4, buf);
+ break;
+ }
+ _phone_lock_view_set_entry_bg_color(phone_lock_view_data);
+
+ if (length != 4) {
+ PHONE_LOCK_DBG("%s %d", __FUNCTION__, __LINE__);
+ return;
+ }
+ PHONE_LOCK_DBG("%s %d length = %d", __FUNCTION__, __LINE__, length);
+ phone_lock_view_hide_imf_context_input_panel(phone_lock_view_data);
+ _phone_lock_view_set_str(&phone_lock_view_data->contents,
+ _phone_lock_view_entry_get(editfield_layout));
+
+ if (phone_lock_view_data->func) {
+ phone_lock_view_data->func(2, phone_lock_view_data->contents,
+ phone_lock_view_data->user_data);
+ phone_lock_view_data->is_simple_pw_checking = EINA_TRUE;
+ PHONE_LOCK_DBG("%s %d phone_lock_view_data->contents = %s",
+ __FUNCTION__, __LINE__,
+ phone_lock_view_data->contents);
+ }
+}
+
+static void _phone_lock_view_label_signal_process(void *data, Evas_Object * o,
+ const char *emission,
+ const char *source)
+{
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+ PHONE_LOCK_DBG("emission = %s", emission);
+ if (!phone_lock_view_data) {
+ return;
+ }
+
+ if ((strcmp("sp1_entry_clicked", emission) == 0)
+ || (strcmp("sp2_entry_clicked", emission) == 0)
+ || (strcmp("sp3_entry_clicked", emission) == 0)
+ || (strcmp("sp4_entry_clicked", emission) == 0)) {
+ phone_lock_view_show_imf_context_input_panel
+ (phone_lock_view_data);
+ }
+ _phone_lock_view_set_entry_bg_color(phone_lock_view_data);
+}
+
+static void _phone_lock_view_focused_cb(void *data, Evas_Object * obj,
+ void *event_info)
+{
+ PHONE_LOCK_DBG("_focused_cb\n");
+ if (!elm_entry_is_empty(obj)) {
+ elm_object_signal_emit(data, "elm,state,eraser,show", "elm");
+ }
+ elm_object_signal_emit(data, "elm,state,guidetext,hide", "elm");
+}
+
+static void _phone_lock_view_unfocused_cb(void *data, Evas_Object * obj,
+ void *event_info)
+{
+ PHONE_LOCK_DBG("_unfocused_cb\n");
+ if (elm_entry_is_empty(obj)) {
+ elm_object_signal_emit(data, "elm,state,guidetext,show", "elm");
+ }
+ elm_object_signal_emit(data, "elm,state,eraser,hide", "elm");
+}
+
+static void _phone_lock_view_eraser_clicked_cb(void *data, Evas_Object * obj,
+ const char *emission,
+ const char *source)
+{
+ PHONE_LOCK_DBG("_eraser_clicked_cb\n");
+ elm_entry_entry_set(data, "");
+}
+
+static Evas_Object *_phone_lock_view_editfield_create(Evas_Object * parent,
+ void *data)
+{
+ Evas_Object *layout = NULL;
+ Evas_Object *entry = NULL;
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+ static Elm_Entry_Filter_Limit_Size limit_filter_data;
+
+ limit_filter_data.max_char_count = PHONE_LOCK_VIEW_SIMPLE_PHONE_LOCK_MAX_LENGTH; /* hard code for demo */
+ limit_filter_data.max_byte_count = 0;
+ PHONE_LOCK_DBG("_openlock_setting_pw_editfield_create\n");
+
+ layout = elm_layout_add(parent);
+ elm_layout_theme_set(layout, "layout", "editfield", "default");
+
+ entry = elm_entry_add(parent);
+ elm_entry_scrollable_set(entry, EINA_TRUE);
+ elm_entry_single_line_set(entry, EINA_TRUE);
+ elm_entry_password_set(entry, EINA_TRUE);
+ elm_object_focus_set(entry, EINA_TRUE);
+ elm_entry_input_panel_layout_set(entry,
+ ELM_INPUT_PANEL_LAYOUT_NUMBERONLY);
+ elm_entry_markup_filter_append(entry, elm_entry_filter_limit_size,
+ &limit_filter_data);
+ evas_object_show(layout);
+ if (entry) {
+ elm_object_focus_set(entry, EINA_TRUE);
+ phone_lock_view_data->is_customedentry_clicked = EINA_TRUE;
+ }
+ evas_object_move(entry, -100, -100); /* can't be seen */
+ evas_object_hide(entry);
+
+ evas_object_smart_callback_add(entry, "changed",
+ _phone_lock_view_simple_entry_changed_cb,
+ phone_lock_view_data);
+ evas_object_smart_callback_add(entry, "focused",
+ _phone_lock_view_focused_cb, layout);
+ evas_object_smart_callback_add(entry, "unfocused",
+ _phone_lock_view_unfocused_cb, layout);
+
+ elm_object_part_content_set(layout, "elm.swallow.content", entry);
+ elm_object_part_text_set(layout, "elm.guidetext", "");
+ elm_object_signal_callback_add(layout, "elm,eraser,clicked", "elm",
+ _phone_lock_view_eraser_clicked_cb,
+ entry);
+ return layout;
+}
+
+static Evas_Object *_phone_lock_view_editfield_entry_get(Evas_Object * parent)
+{
+ Evas_Object *entry = NULL;
+
+ entry = elm_object_part_content_get(parent, "elm.swallow.content");
+
+ return entry;
+}
+
+void
+_phone_lock_view_create_alpha_view_simple_lock(phone_lock_view_data_t *
+ phone_lock_view_data)
+{
+ Evas_Object *background = NULL;
+ Evas_Object *title_label = NULL;
+ Evas_Object *label1 = NULL;
+ Evas_Object *label2 = NULL;
+ Evas_Object *label3 = NULL;
+ Evas_Object *label4 = NULL;
+ Evas_Object *layout = NULL;
+ Evas_Object *input = NULL;
+
+ background =
+ _phone_lock_view_create_layout(phone_lock_view_data->layout_main,
+ EDJ_PHONE_LOCK_VIEW,
+ "phlock.view.main.simple");
+
+ evas_object_resize(background, phone_lock_view_data->win_w,
+ phone_lock_view_data->win_h);
+ evas_object_show(background);
+
+ _phone_lock_view_create_bg_image(background);
+
+ title_label = elm_label_add(background);
+ elm_object_text_set(title_label, "");
+ elm_object_part_content_set(background, "swallow.title", title_label);
+
+ evas_object_show(title_label);
+
+ input =
+ _phone_lock_view_create_layout(background, EDJ_PHONE_LOCK_VIEW,
+ "phlock.view.input.simple");
+
+ layout =
+ _phone_lock_view_editfield_create(background, phone_lock_view_data);
+
+ Ecore_IMF_Context *imf_context =
+ elm_entry_imf_context_get(_phone_lock_view_editfield_entry_get
+ (layout));
+ ecore_imf_context_input_panel_event_callback_add(imf_context,
+ ECORE_IMF_INPUT_PANEL_STATE_EVENT,
+ _phone_lock_view_input_panel_event_cb,
+ phone_lock_view_data);
+ ecore_imf_context_input_panel_language_set(imf_context,
+ ECORE_IMF_INPUT_PANEL_LANG_ALPHABET);
+
+ label1 = elm_label_add(background);
+ elm_object_text_set(label1, "");
+ elm_object_part_content_set(input, "sp1_entry", label1);
+ evas_object_show(label1);
+
+ label2 = elm_label_add(background);
+ elm_object_text_set(label2, "");
+ elm_object_part_content_set(input, "sp2_entry", label2);
+ evas_object_show(label2);
+
+ label3 = elm_label_add(background);
+ elm_object_text_set(label3, "");
+ elm_object_part_content_set(input, "sp3_entry", label3);
+ evas_object_show(label3);
+
+ label4 = elm_label_add(background);
+ elm_object_text_set(label4, "");
+ elm_object_part_content_set(input, "sp4_entry", label4);
+ evas_object_show(label4);
+
+ edje_object_signal_callback_add(_EDJ(input), "sp1_entry_clicked", "*",
+ _phone_lock_view_label_signal_process,
+ phone_lock_view_data);
+ edje_object_signal_callback_add(_EDJ(input), "sp2_entry_clicked", "*",
+ _phone_lock_view_label_signal_process,
+ phone_lock_view_data);
+ edje_object_signal_callback_add(_EDJ(input), "sp3_entry_clicked", "*",
+ _phone_lock_view_label_signal_process,
+ phone_lock_view_data);
+ edje_object_signal_callback_add(_EDJ(input), "sp4_entry_clicked", "*",
+ _phone_lock_view_label_signal_process,
+ phone_lock_view_data);
+
+ phone_lock_view_data->background = background;
+ phone_lock_view_data->title_label = title_label;
+ phone_lock_view_data->editfield_layout = layout;
+ phone_lock_view_data->sp_label1 = label1;
+ phone_lock_view_data->sp_label2 = label2;
+ phone_lock_view_data->sp_label3 = label3;
+ phone_lock_view_data->sp_label4 = label4;
+ phone_lock_view_data->input = input;
+
+ _phone_lock_view_create_emergency_event(phone_lock_view_data);
+ _phone_lock_view_create_info(phone_lock_view_data);
+ _phone_lock_view_update_phone_lock(phone_lock_view_data);
+ vconf_notify_key_changed
+ (VCONFKEY_SETAPPL_PHONE_LOCK_ATTEMPTS_LEFT_INT,
+ _phone_lock_view_check_vconf_value_cb, phone_lock_view_data);
+ vconf_notify_key_changed(VCONFKEY_PM_STATE,
+ _phone_lock_view_notify_pm_state_cb,
+ phone_lock_view_data);
+ _phone_lock_view_check_vconf_value(phone_lock_view_data);
+}
+
+phone_lock_view_data_t *phone_lock_view_create(phone_lock_view_type_t view_type,
+ phone_lock_window_type_t
+ window_type,
+ Evas_Object * win_main,
+ phone_lock_view_cbfunc func,
+ void *user_data)
+{
+ PHONE_LOCK_DBG("%s, win : %p", __FUNCTION__, win_main);
+
+ phone_lock_view_data_t *phone_lock_view_data;
+ phone_lock_view_data =
+ (phone_lock_view_data_t *) malloc(sizeof(phone_lock_view_data_t));
+ if (!phone_lock_view_data)
+ return NULL;
+
+ memset(phone_lock_view_data, 0, sizeof(phone_lock_view_data_t));
+
+ ecore_x_window_size_get(ecore_x_window_root_first_get(),
+ &phone_lock_view_data->win_w,
+ &phone_lock_view_data->win_h);
+
+ phone_lock_view_data->view_type = view_type;
+ phone_lock_view_data->window_type = window_type;
+ phone_lock_view_data->win_main = win_main;
+ phone_lock_view_data->func = func;
+ phone_lock_view_data->user_data = user_data;
+ phone_lock_view_data->scale =
+ (double)(phone_lock_view_data->win_w) /
+ (double)PHONE_LOCK_VIEW_MAIN_W;
+
+ phone_lock_view_data->layout_main =
+ _phone_lock_view_create_layout(phone_lock_view_data->win_main, NULL,
+ NULL);
+
+ if (window_type == PHONE_LOCK_WINDOW_TYPE_ALPHA) {
+ int simple_password_on = 0;
+ evas_object_color_set(phone_lock_view_data->layout_main, 255, 255, 255, 0.7); /* for alpha window */
+ vconf_get_bool(VCONFKEY_SETAPPL_STATE_SIMPLE_PASSWORD_BOOL,
+ &simple_password_on);
+ if (simple_password_on == 1) {
+ phone_lock_view_data->lock_type =
+ PHONE_LOCK_VIEW_SIMPLE_PHONE_LOCK;
+ } else {
+ phone_lock_view_data->lock_type =
+ PHONE_LOCK_VIEW_COMPLEX_PHONE_LOCK;
+ }
+ PHONE_LOCK_DBG("phone_lock_view_data->lock_type = %d\n",
+ phone_lock_view_data->lock_type);
+
+ if (view_type >= PHONE_LOCK_VIEW_TYPE_PHONE_LOCK
+ && view_type < PHONE_LOCK_VIEW_TYPE_PHONE_MAX) {
+ switch (phone_lock_view_data->lock_type) {
+ case PHONE_LOCK_VIEW_COMPLEX_PHONE_LOCK:
+ _phone_lock_view_create_alpha_view_complex_lock
+ (phone_lock_view_data);
+ break;
+ case PHONE_LOCK_VIEW_SIMPLE_PHONE_LOCK:
+ _phone_lock_view_create_alpha_view_simple_lock
+ (phone_lock_view_data);
+ break;
+ default:
+ break;
+ }
+ } else {
+ PHONE_LOCK_DBG("Error. Invalide view type\n");
+ free(phone_lock_view_data);
+ return NULL;
+ }
+ }
+ return phone_lock_view_data;
+}
+
+void phone_lock_view_destroy(phone_lock_view_data_t * phone_lock_view_data)
+{
+ vconf_ignore_key_changed(VCONFKEY_SETAPPL_PHONE_LOCK_ATTEMPTS_LEFT_INT,
+ _phone_lock_view_check_vconf_value_cb);
+ vconf_ignore_key_changed(VCONFKEY_PM_STATE,
+ _phone_lock_view_notify_pm_state_cb);
+ PHONE_LOCK_DBG("%s", __FUNCTION__);
+ if (phone_lock_view_data) {
+ _phone_lock_fini_heynoti(phone_lock_view_data);
+ ecore_imf_context_input_panel_event_callback_del
+ (elm_entry_imf_context_get
+ (_phone_lock_view_editfield_entry_get
+ (phone_lock_view_data->editfield_layout)),
+ ECORE_IMF_INPUT_PANEL_STATE_EVENT,
+ _phone_lock_view_input_panel_event_cb);
+ ecore_imf_context_input_panel_event_callback_del
+ (elm_entry_imf_context_get
+ (phone_lock_view_data->input_entry),
+ ECORE_IMF_INPUT_PANEL_STATE_EVENT,
+ _phone_lock_view_input_panel_event_cb);
+ if (phone_lock_view_data->emgc_up_timer) {
+ ecore_timer_del(phone_lock_view_data->emgc_up_timer);
+ phone_lock_view_data->emgc_up_timer = NULL;
+ }
+ if (phone_lock_view_data->slide_timer) {
+ ecore_timer_del(phone_lock_view_data->slide_timer);
+ phone_lock_view_data->slide_timer = NULL;
+ }
+
+ if (phone_lock_view_data->phone_lock_timer) {
+ ecore_timer_del(phone_lock_view_data->phone_lock_timer);
+ phone_lock_view_data->phone_lock_timer = NULL;
+ }
+ if (phone_lock_view_data->info_timer) {
+ ecore_timer_del(phone_lock_view_data->info_timer);
+ phone_lock_view_data->info_timer = NULL;
+ }
+
+ if (phone_lock_view_data->contents) {
+ free(phone_lock_view_data->contents);
+ phone_lock_view_data->contents = NULL;
+ }
+ if (phone_lock_view_data->sp_label1) {
+ evas_object_del(phone_lock_view_data->sp_label1);
+ phone_lock_view_data->sp_label1 = NULL;
+ }
+ if (phone_lock_view_data->sp_label2) {
+ evas_object_del(phone_lock_view_data->sp_label2);
+ phone_lock_view_data->sp_label2 = NULL;
+ }
+ if (phone_lock_view_data->sp_label3) {
+ evas_object_del(phone_lock_view_data->sp_label3);
+ phone_lock_view_data->sp_label3 = NULL;
+ }
+ if (phone_lock_view_data->sp_label4) {
+ evas_object_del(phone_lock_view_data->sp_label4);
+ phone_lock_view_data->sp_label4 = NULL;
+ }
+ if (phone_lock_view_data->editfield_layout) {
+ evas_object_del(phone_lock_view_data->editfield_layout);
+ phone_lock_view_data->editfield_layout = NULL;
+ }
+ if (phone_lock_view_data->info) {
+ evas_object_del(phone_lock_view_data->info);
+ phone_lock_view_data->info = NULL;
+ }
+
+ if (phone_lock_view_data->theme) {
+ elm_theme_extension_del(phone_lock_view_data->theme,
+ EDJ_PHONE_LOCK_VIEW_ENTRY);
+ elm_theme_free(phone_lock_view_data->theme);
+ }
+ if (phone_lock_view_data->layout_main) {
+ evas_object_del(phone_lock_view_data->layout_main);
+ phone_lock_view_data->layout_main = NULL;
+ }
+ }
+
+ free(phone_lock_view_data);
+ phone_lock_view_data = NULL;
+}
+
+Evas_Object *phone_lock_view_get_layoutmain(phone_lock_view_data_t *
+ phone_lock_view_data)
+{
+ return phone_lock_view_data->layout_main;
+}
+
+phone_lock_view_type_t phone_lock_view_get_type(phone_lock_view_data_t *
+ phone_lock_view_data)
+{
+ return phone_lock_view_data->view_type;
+}
+
+phone_lock_window_type_t
+phone_lock_window_get_type(phone_lock_view_data_t * phone_lock_view_data)
+{
+ return phone_lock_view_data->window_type;
+}
+
+void phone_lock_view_hide_imf_context_input_panel(void *data)
+{
+ PHONE_LOCK_DBG("");
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+ Ecore_IMF_Context *imf_context = NULL;
+
+ if (NULL == phone_lock_view_data) {
+ return;
+ }
+
+ switch (phone_lock_view_data->lock_type) {
+ case PHONE_LOCK_VIEW_COMPLEX_PHONE_LOCK:
+ imf_context =
+ elm_entry_imf_context_get
+ (phone_lock_view_data->input_entry);
+ if (imf_context) {
+ ecore_imf_context_input_panel_hide(imf_context);
+ }
+ break;
+ case PHONE_LOCK_VIEW_SIMPLE_PHONE_LOCK:
+ evas_object_hide(phone_lock_view_data->editfield_layout);
+ elm_object_focus_set(_phone_lock_view_editfield_entry_get
+ (phone_lock_view_data->editfield_layout),
+ EINA_FALSE);
+ imf_context =
+ elm_entry_imf_context_get
+ (_phone_lock_view_editfield_entry_get
+ (phone_lock_view_data->editfield_layout));
+ if (imf_context) {
+ ecore_imf_context_input_panel_hide(imf_context);
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+void phone_lock_view_show_imf_context_input_panel(void *data)
+{
+ PHONE_LOCK_DBG("");
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+ Ecore_IMF_Context *imf_context = NULL;
+
+ if (NULL == phone_lock_view_data) {
+ return;
+ }
+
+ PHONE_LOCK_DBG
+ ("phone_lock_view_data->is_callug_launched = %d,phone_lock_view_data->is_customedentry_clicked = %d",
+ phone_lock_view_data->is_callug_launched,
+ phone_lock_view_data->is_customedentry_clicked);
+ PHONE_LOCK_DBG
+ ("phone_lock_view_data->view_disabled = %d,phone_lock_view_data->is_customedentry_clicked = %d",
+ phone_lock_view_data->view_disabled,
+ phone_lock_view_data->is_customedentry_clicked);
+ PHONE_LOCK_DBG
+ ("phone_lock_view_data->view_disabled = %d,phone_lock_view_data->is_customedentry_clicked = %d",
+ phone_lock_view_data->view_disabled,
+ phone_lock_view_data->is_customedentry_clicked);
+ if ((phone_lock_view_data->view_disabled == 0)
+ && (phone_lock_view_data->is_customedentry_clicked == EINA_TRUE)) {
+ switch (phone_lock_view_data->lock_type) {
+ case PHONE_LOCK_VIEW_COMPLEX_PHONE_LOCK:
+ evas_object_show(phone_lock_view_data->input_entry);
+ elm_object_focus_set(phone_lock_view_data->input_entry,
+ EINA_TRUE);
+ imf_context =
+ elm_entry_imf_context_get
+ (phone_lock_view_data->input_entry);
+ if (imf_context) {
+ ecore_imf_context_input_panel_show(imf_context);
+ }
+ break;
+ case PHONE_LOCK_VIEW_SIMPLE_PHONE_LOCK:
+ PHONE_LOCK_DBG("");
+ evas_object_show
+ (phone_lock_view_data->editfield_layout);
+ elm_object_focus_set
+ (_phone_lock_view_editfield_entry_get
+ (phone_lock_view_data->editfield_layout),
+ EINA_TRUE);
+ imf_context =
+ elm_entry_imf_context_get
+ (_phone_lock_view_editfield_entry_get
+ (phone_lock_view_data->editfield_layout));
+ if (imf_context) {
+ ecore_imf_context_input_panel_show(imf_context);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+void phone_lock_view_check_attempts_left(void *data)
+{
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+ PHONE_LOCK_DBG("%s", __FUNCTION__);
+
+ int value = -1;
+
+ vconf_get_int(VCONFKEY_SETAPPL_PHONE_LOCK_ATTEMPTS_LEFT_INT, &value);
+ value--;
+
+ if (value > 0 && value <= PHONE_LOCK_VIEW_PHONE_LOCK_ATTEMPTS_MAX) {
+ char temp_str[200] = { 0, };
+ char temp_left[50] = { 0, };
+
+ vconf_set_int(VCONFKEY_SETAPPL_PHONE_LOCK_ATTEMPTS_LEFT_INT,
+ value);
+ snprintf(temp_left, 50,
+ phone_lock_get_string(IDS_IDLE_BODY_PD_ATTEMPTS_LEFT),
+ value);
+ snprintf(temp_str, 200, "%s, %s",
+ phone_lock_get_string(IDS_IDLE_BODY_WRONG_PASSWORD),
+ temp_left);
+ phone_lock_view_show_msg(phone_lock_view_data, temp_str);
+ } else if (value == 0) {
+ time_t cur_time = time(NULL);
+ char cur_timestamp[64] = { 0, };
+
+ snprintf(cur_timestamp, sizeof(cur_timestamp), "%ld", cur_time);
+ vconf_set_str(VCONFKEY_SETAPPL_PHONE_LOCK_TIMESTAMP_STR,
+ cur_timestamp);
+ vconf_set_int(VCONFKEY_SETAPPL_PHONE_LOCK_ATTEMPTS_LEFT_INT,
+ value);
+ phone_lock_view_data->block_seconds = PHONE_LOCK_VIEW_PHONE_LOCK_BLOCK_SECONDS; /* set the initial value for block seconds */
+ phone_lock_view_data->view_disabled = 1;
+ switch (phone_lock_view_data->lock_type) {
+ case PHONE_LOCK_VIEW_COMPLEX_PHONE_LOCK:
+ _phone_lock_view_disable_phone_lock
+ (phone_lock_view_data);
+ break;
+ case PHONE_LOCK_VIEW_SIMPLE_PHONE_LOCK:
+ _phone_lock_view_disable_simple_phone_lock
+ (phone_lock_view_data);
+ break;
+ default:
+ break;
+ }
+ phone_lock_view_show_msg(phone_lock_view_data,
+ phone_lock_get_string
+ (IDS_IDLE_BODY_INPUT_PASSWORD_AFTER_THIRTYSECONDS));
+ }
+}
+
+void phone_lock_view_reset_attempts_num(void *data)
+{
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+ PHONE_LOCK_DBG("%s", __FUNCTION__);
+
+ if (phone_lock_view_data == NULL) {
+ return;
+ }
+ vconf_ignore_key_changed(VCONFKEY_SETAPPL_PHONE_LOCK_ATTEMPTS_LEFT_INT,
+ _phone_lock_view_check_vconf_value_cb);
+ vconf_set_int(VCONFKEY_SETAPPL_PHONE_LOCK_ATTEMPTS_LEFT_INT,
+ PHONE_LOCK_VIEW_PHONE_LOCK_ATTEMPTS_MAX);
+}
+
+void phone_lock_view_reset_callug_launch_flag(void *data)
+{
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+ PHONE_LOCK_DBG("%s", __FUNCTION__);
+
+ if (phone_lock_view_data == NULL) {
+ return;
+ }
+ phone_lock_view_data->is_callug_launched = EINA_FALSE;
+}
+
+void phone_lock_view_set_right_password_flag(void *data)
+{
+ phone_lock_view_data_t *phone_lock_view_data =
+ (phone_lock_view_data_t *) data;
+ PHONE_LOCK_DBG("%s", __FUNCTION__);
+
+ if (phone_lock_view_data == NULL) {
+ return;
+ }
+ phone_lock_view_data->is_right_password = EINA_TRUE;
+}
+
+void
+phone_lock_view_show_msg(phone_lock_view_data_t * phone_lock_view_data,
+ const char *str)
+{
+ Evas_Object *popup;
+
+ PHONE_LOCK_DBG("%s : %d, %p", __FUNCTION__,
+ phone_lock_view_data->view_type, phone_lock_view_data);
+
+ popup = elm_popup_add(phone_lock_view_data->win_main);
+ evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+
+ evas_object_smart_callback_add(popup, "block,clicked",
+ _phone_lock_view_block_clicked_cb, phone_lock_view_data);
+ elm_popup_timeout_set(popup, 3);
+
+ elm_object_text_set(popup, str);
+
+ evas_object_smart_callback_add(popup, "timeout",
+ _phone_lock_view_popup_timeout_cb, phone_lock_view_data);
+ evas_object_show(popup);
+}
--- /dev/null
+
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${PHONE_LOCK_COMMON}/include)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs_main REQUIRED appcore-efl vconf utilX ui-gadget bundle ecore-imf ecore-x eina evas ecore edje
+ecore-input glib-2.0 aul sysman)
+
+FOREACH(flag ${pkgs_main_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")
+
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${PREFIX}/lib -pie")
+
+ADD_EXECUTABLE(${PROJECT_NAME}
+ ./src/phone-lock.c
+ ./src/phone-lock-ui.c
+)
+#TARGET_LINK_LIBRARIES(${PROJECT_NAME} phone-lock-common)
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} -L${CMAKE_BINARY_COMMON_DIR} -lphone-lock-common ${pkgs_main_LDFLAGS})
+#TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_main_LDFLAGS})
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
+
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#ifndef __PHONE_LOCK_UI_H__
+#define __PHONE_LOCK_UI_H__
+
+#include <Elementary.h>
+
+int phone_lock_show_alpha_ug(struct appdata *ad);
+
+#endif /* __PHONE_LOCK_UI_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#ifndef __PWLOCK_H__
+#define __PWLOCK_H__
+
+#include <Elementary.h>
+#include <glib.h>
+#include <aul.h>
+#include <openssl/sha.h>
+#include <sysman.h>
+
+#if !defined(PACKAGE)
+#define PACKAGE "org.tizen.phone-lock"
+#endif
+
+#if !defined(LOCALEDIR)
+#define LOCALEDIR "/opt/apps/org.tizen.phone-lock/res/locale"
+#endif
+
+enum {
+ _ST_FIRST,
+ _ST_PHONE,
+ _ST_EXIT,
+ _ST_MAX,
+};
+
+struct appdata {
+ Evas_Object *win;
+ Ecore_Idler *idler;
+ int state;
+ int running_status;
+ int window_status;
+ int win_type;
+};
+
+void phone_lock_do_state(struct appdata *ad);
+void phone_lock_set_win_prop(struct appdata *ad, int type);
+
+#endif /* __PWLOCK_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#include <appcore-efl.h>
+#include <ui-gadget.h>
+#include <Ecore_X.h>
+#include <vconf.h>
+#include <bundle.h>
+
+#include "phone-lock.h"
+#include "phone-lock-util.h"
+#include "phone-lock-ui.h"
+#include "phone-lock-string.h"
+
+static void _phone_lock_alpha_ug_layout_cb(struct ui_gadget *ug,
+ enum ug_mode mode, void *priv)
+{
+ struct appdata *ad = NULL;
+ Evas_Object *base;
+
+ if (!ug || !priv)
+ return;
+
+ ad = priv;
+ base = ug_get_layout(ug);
+ if (!base)
+ return;
+
+ switch (mode) {
+ case UG_MODE_FULLVIEW:
+ evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(ad->win, base);
+ evas_object_show(base);
+ break;
+ case UG_MODE_FRAMEVIEW:
+ break;
+ default:
+ break;
+ }
+}
+
+static void _phone_lock_alpha_ug_result_cb(struct ui_gadget *ug,
+ bundle * result, void *priv)
+{
+ struct appdata *ad = (struct appdata *)priv;
+ const char *val1 = NULL, *val2 = NULL;
+ int alpha;
+
+ if (!ug || !priv)
+ return;
+ ad = (struct appdata *)priv;
+
+ val1 = bundle_get_val(result, "name");
+
+ if (val1 == NULL)
+ return;
+
+ if (!strcmp(val1, "phonelock-ug")) {
+ val2 = bundle_get_val(result, "result");
+ if (val2 == NULL)
+ return;
+
+ if (!strcmp(val2, "success")) {
+ _DBG("password verified. Unlock!\n");
+ }
+ } else if (!strcmp(val1, "phonelock-ug-alpha")) {
+ val2 = bundle_get_val(result, "result");
+ if (val2 == NULL)
+ return;
+
+ alpha = atoi(val2);
+ }
+}
+
+static void _phone_lock_alpha_ug_destroy_cb(struct ui_gadget *ug, void *priv)
+{
+ struct appdata *ad = (struct appdata *)priv;
+
+ if (!ug)
+ return;
+
+ ug_destroy(ug);
+ ug = NULL;
+ phone_lock_send_cmd("unlock");
+}
+
+int phone_lock_show_alpha_ug(struct appdata *ad)
+{
+ _DBG("%s,%d", __func__, __LINE__);
+
+ bundle *b = NULL;
+ struct ug_cbs cbs = { 0, };
+
+ cbs.layout_cb = _phone_lock_alpha_ug_layout_cb;
+ cbs.result_cb = _phone_lock_alpha_ug_result_cb;
+ cbs.destroy_cb = _phone_lock_alpha_ug_destroy_cb;
+ cbs.priv = (void *)ad;
+
+ b = bundle_create();
+ bundle_add(b, "phone-lock-type", "phone-lock");
+ bundle_add(b, "window-type", "alpha");
+
+ elm_win_alpha_set(ad->win, TRUE);
+ evas_object_color_set(ad->win, 0, 0, 0, 0);
+
+ Evas_Object *bg = elm_bg_add(ad->win);
+ evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ evas_object_color_set(bg, 255, 255, 255, 120);
+ elm_win_resize_object_add(ad->win, bg);
+ evas_object_show(bg);
+
+ ecore_x_icccm_name_class_set(elm_win_xwindow_get(ad->win),
+ "LOCK_SCREEN", "LOCK_SCREEN");
+
+ UG_INIT_EFL(ad->win, UG_OPT_INDICATOR_ENABLE);
+ ug_create(NULL, "phone-lock-efl", UG_MODE_FULLVIEW, b, &cbs);
+
+ if (b) {
+ bundle_free(b);
+ }
+
+ evas_object_show(ad->win);
+ phone_lock_set_win_prop(ad, ECORE_X_WINDOW_TYPE_NOTIFICATION);
+ return 1;
+}
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#include <stdio.h>
+#include <appcore-efl.h>
+#include <Ecore_X.h>
+#include <vconf.h>
+#include <utilX.h>
+#include <ui-gadget.h>
+
+#include "phone-lock.h"
+#include "phone-lock-util.h"
+#include "phone-lock-string.h"
+#include "phone-lock-ui.h"
+
+#define MENUSCREEN_PKG_NAME "db/menuscreen/pkgname"
+
+struct state {
+ int (*_do) (struct appdata * ad);
+};
+
+static int do_ST_FIRST(struct appdata *ad);
+static int do_ST_PHONE(struct appdata *ad);
+static int do_ST_EXIT(struct appdata *ad);
+
+static Eina_Bool _phone_lock_do_state(void *data);
+static int _phone_lock_get_locked_status(void);
+static void _phone_lock_set_unlock_state(struct appdata *ad);
+static void _phone_lock_set_lock_state(struct appdata *ad);
+static void _phone_lock_vconf_call_state_changed_cb(keynode_t * node,
+ void *data);
+static void _phone_lock_register_vconf(struct appdata *ad);
+static void _phone_lock_unregister_vconf(struct appdata *ad);
+static void _phone_lock_grab_key(Evas_Object * win);
+static void _phone_lock_ungrab_key(Evas_Object * win);
+static void _phone_lock_focus_out_cb(void *data, Evas_Object * obj,
+ void *event_info);
+static int _phone_lock_low_battery_cb(void *data);
+
+static struct state states[_ST_MAX] = {
+ {do_ST_FIRST,},
+ {do_ST_PHONE,},
+ {do_ST_EXIT,},
+};
+
+static inline void trans(struct appdata *ad, int state)
+{
+ _DBG("trans state %d --> state %d", ad->state, state);
+ ad->state = state;
+
+}
+
+static int do_ST_FIRST(struct appdata *ad)
+{
+ _DBG("%s", __func__);
+
+ trans(ad, _ST_PHONE);
+
+ return ECORE_CALLBACK_RENEW;
+}
+
+static int do_ST_PHONE(struct appdata *ad)
+{
+ int r;
+
+ _DBG("%s", __func__);
+
+ r = _phone_lock_get_locked_status();
+ _DBG("r = %d, ad->running_status = %d, ad->window_status = %d, %s", r,
+ ad->running_status, ad->window_status, __func__);
+
+ if (r) {
+ if (ad->running_status == 1 && ad->window_status == 0) {
+ _phone_lock_set_lock_state(ad);
+ phone_lock_show_alpha_ug(ad);
+ trans(ad, _ST_EXIT);
+ r = ECORE_CALLBACK_CANCEL;
+ }
+ }
+ return r;
+}
+
+static int do_ST_EXIT(struct appdata *ad)
+{
+ _DBG("%s", __func__);
+
+ elm_exit();
+ return ECORE_CALLBACK_CANCEL;
+}
+
+static Eina_Bool _phone_lock_do_state(void *data)
+{
+ int r;
+ struct appdata *ad = data;
+
+ _DBG("%s, ad->state:%d", __func__, ad->state);
+
+ if (ad->state < _ST_FIRST || ad->state >= _ST_MAX) {
+ _ERR("Unknown state: %d", ad->state);
+ trans(ad, _ST_EXIT);
+ r = ECORE_CALLBACK_RENEW;
+ } else
+ r = states[ad->state]._do(ad);
+
+ if (r == ECORE_CALLBACK_CANCEL)
+ ad->idler = NULL;
+
+ return r;
+}
+
+static int _phone_lock_get_locked_status(void)
+{
+ int r;
+ int locked;
+
+ r = vconf_get_bool(VCONFKEY_SETAPPL_STATE_POWER_ON_LOCK_BOOL, &locked);
+ if (r) {
+ _ERR("Get phone lock value error\n");
+ locked = 0;
+ }
+
+ _DBG("phone_locked status: %d", locked);
+
+ return locked;
+}
+
+static void _phone_lock_set_unlock_state(struct appdata *ad)
+{
+ if (ad->running_status > 0)
+ vconf_set_int(VCONFKEY_PWLOCK_STATE,
+ VCONFKEY_PWLOCK_RUNNING_UNLOCK);
+ else
+ vconf_set_int(VCONFKEY_PWLOCK_STATE,
+ VCONFKEY_PWLOCK_BOOTING_UNLOCK);
+}
+
+static void _phone_lock_set_lock_state(struct appdata *ad)
+{
+ if (ad->running_status > 0)
+ vconf_set_int(VCONFKEY_PWLOCK_STATE,
+ VCONFKEY_PWLOCK_RUNNING_LOCK);
+ else
+ vconf_set_int(VCONFKEY_PWLOCK_STATE,
+ VCONFKEY_PWLOCK_BOOTING_LOCK);
+}
+
+static void _phone_lock_vconf_call_state_changed_cb(keynode_t * node,
+ void *data)
+{
+ int api_ret = 0;
+ int vconf_val = 0;
+ struct appdata *ad = data;
+
+ _DBG("%s", __func__);
+
+ api_ret = vconf_get_int(VCONFKEY_CALL_STATE, &vconf_val);
+ if (api_ret != 0) {
+ _DBG("fail to get vconf key %s value", VCONFKEY_CALL_STATE);
+ } else {
+ if (vconf_val == VCONFKEY_CALL_OFF) {
+ _DBG("call off state..");
+ phone_lock_set_win_prop(ad,
+ ECORE_X_WINDOW_TYPE_NOTIFICATION);
+ } else {
+ _DBG("call on state..");
+ phone_lock_set_win_prop(ad, ECORE_X_WINDOW_TYPE_NORMAL);
+ }
+ }
+ return;
+}
+
+static void _phone_lock_register_vconf(struct appdata *ad)
+{
+ _DBG("%s", __func__);
+ if (vconf_notify_key_changed
+ (VCONFKEY_CALL_STATE, _phone_lock_vconf_call_state_changed_cb,
+ ad) != 0) {
+ _DBG("Fail to register");
+ }
+}
+
+static void _phone_lock_unregister_vconf(struct appdata *ad)
+{
+ _DBG("%s", __func__);
+ if (vconf_ignore_key_changed
+ (VCONFKEY_CALL_STATE,
+ _phone_lock_vconf_call_state_changed_cb) != 0) {
+ _DBG("Fail to unregister");
+ }
+}
+
+static void _phone_lock_grab_key(Evas_Object * win)
+{
+ Ecore_X_Window w;
+
+ w = elm_win_xwindow_get(win);
+
+ utilx_grab_key(ecore_x_display_get(), w, KEY_SELECT, EXCLUSIVE_GRAB);
+ utilx_grab_key(ecore_x_display_get(), w, KEY_CAMERA, TOP_POSITION_GRAB);
+}
+
+static void _phone_lock_ungrab_key(Evas_Object * win)
+{
+ Ecore_X_Window w;
+
+ w = elm_win_xwindow_get(win);
+
+ utilx_ungrab_key(ecore_x_display_get(), w, KEY_SELECT);
+ utilx_ungrab_key(ecore_x_display_get(), w, KEY_CAMERA);
+}
+
+static void _phone_lock_focus_out_cb(void *data, Evas_Object * obj,
+ void *event_info)
+{
+ int pid = 0;
+ char buf[128];
+ Ecore_X_Window x_win_focused;
+ struct appdata *ad = data;
+
+ _DBG("%s", __func__);
+
+ x_win_focused = ecore_x_window_focus_get();
+ ecore_x_netwm_pid_get(x_win_focused, &pid);
+ if (aul_app_get_pkgname_bypid(pid, buf, sizeof(buf)) < 0) {
+ _DBG("no such pkg by pid %d\n", pid);
+ } else {
+ char *pkg_str;
+ _DBG("created pkgname = %s, pid = %d\n", buf, pid);
+ pkg_str = vconf_get_str(MENUSCREEN_PKG_NAME);
+ if ((pkg_str != NULL)
+ && !strncmp(pkg_str, buf, strlen(pkg_str))) {
+ _DBG("%s is on the phone lock.!!\n", pkg_str);
+ elm_win_raise(ad->win);
+ free(pkg_str);
+ pkg_str = NULL;
+ } else
+ if (!strncmp("org.tizen.live-magazine", buf, strlen(buf)))
+ {
+ _DBG("%s is on the phone lock.!!\n", buf);
+ elm_win_raise(ad->win);
+ }
+ }
+
+}
+
+static int _phone_lock_low_battery_cb(void *data)
+{
+ _ERR("System battry goes low");
+ return 0;
+}
+
+static int _phone_lock_app_create(void *data)
+{
+ struct appdata *ad = data;
+
+ _DBG("%s", __func__);
+
+ ad->win = phone_lock_create_win(PACKAGE);
+ if (ad->win == NULL) {
+ _ERR("Create win error");
+ return -1;
+ }
+
+ ecore_imf_init();
+ _phone_lock_grab_key(ad->win);
+ _phone_lock_register_vconf(ad);
+ phone_lock_set_win_prop(ad, ECORE_X_WINDOW_TYPE_NOTIFICATION);
+ evas_object_smart_callback_add(ad->win, "focus,out",
+ _phone_lock_focus_out_cb, ad);
+ appcore_set_i18n(PACKAGE, LOCALEDIR);
+ appcore_set_event_callback(APPCORE_EVENT_LOW_BATTERY,
+ _phone_lock_low_battery_cb, ad);
+
+ ad->state = _ST_FIRST;
+
+ return 0;
+}
+
+static int _phone_lock_app_terminate(void *data)
+{
+ struct appdata *ad = data;
+
+ if (!ad) {
+ return -1;
+ }
+ _DBG("\n ===============> %s\n", __func__);
+
+ _phone_lock_set_unlock_state(ad);
+ _phone_lock_unregister_vconf(ad);
+ _phone_lock_ungrab_key(ad->win);
+ ecore_imf_shutdown();
+
+ if (ad->idler) {
+ ecore_idler_del(ad->idler);
+ ad->idler = NULL;
+ }
+ if (ad->win) {
+ evas_object_del(ad->win);
+ ad->win = NULL;
+ }
+ _DBG("\n ===============> %s end!\n", __func__);
+ return 0;
+}
+
+static int _phone_lock_app_reset(bundle * b, void *data)
+{
+ struct appdata *ad = data;
+
+ _DBG("%s", __func__);
+ char *svcname = NULL;
+
+ if(ad->state != _ST_FIRST) {
+ if (ad->win)
+ elm_win_activate(ad->win);
+ return 0;
+ }
+
+ svcname = (char *)bundle_get_val(b, "pwlock_type");
+
+ if (svcname != NULL) {
+ if (!strcmp(svcname, "running_lock")) {
+ _DBG("%s : running_lock", __func__);
+ ad->running_status = 1;
+ } else if (!strcmp(svcname, "booting_lock")) {
+ _DBG("%s : booting_lock", __func__);
+ ad->running_status = 0;
+ }
+ }
+
+ svcname = (char *)bundle_get_val(b, "window_type");
+
+ if (svcname != NULL) {
+ if (!strcmp(svcname, "normal")) {
+ _DBG("%s : running_lock", __func__);
+ ad->window_status = 1;
+ } else if (!strcmp(svcname, "alpha")) {
+ _DBG("%s : booting_lock", __func__);
+ ad->window_status = 0;
+ }
+ }
+
+ phone_lock_do_state(ad);
+
+ if (ad->win)
+ elm_win_activate(ad->win);
+
+ return 0;
+}
+
+void phone_lock_do_state(struct appdata *ad)
+{
+ _DBG("%s", __func__);
+ if (ad->idler == NULL)
+ ad->idler = ecore_idler_add(_phone_lock_do_state, ad);
+}
+
+void phone_lock_set_win_prop(struct appdata *ad, int type)
+{
+ Ecore_X_Window w;
+
+ w = elm_win_xwindow_get(ad->win);
+
+ if (type == ECORE_X_WINDOW_TYPE_NORMAL) {
+ ecore_x_netwm_window_type_set(w, ECORE_X_WINDOW_TYPE_NORMAL);
+ ad->win_type = ECORE_X_WINDOW_TYPE_NORMAL;
+ } else if (type == ECORE_X_WINDOW_TYPE_NOTIFICATION) {
+ ecore_x_netwm_window_type_set(w,
+ ECORE_X_WINDOW_TYPE_NOTIFICATION);
+ utilx_set_system_notification_level(ecore_x_display_get(), w,
+ UTILX_NOTIFICATION_LEVEL_NORMAL);
+ ad->win_type = ECORE_X_WINDOW_TYPE_NOTIFICATION;
+ }
+}
+
+int main(int argc, char *argv[])
+{
+ struct appdata ad;
+ struct appcore_ops ops = {
+ .create = _phone_lock_app_create,
+ .terminate = _phone_lock_app_terminate,
+ .reset = _phone_lock_app_reset,
+ };
+
+ memset(&ad, 0x0, sizeof(struct appdata));
+
+ _DBG("\n\n========= phone lock is started..!! ===========\n");
+
+ ops.data = &ad;
+
+ return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
+}
--- /dev/null
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${PHONE_LOCK_COMMON}/include)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${PHONE_LOCK_MAIN}/include)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs_phone-lockug REQUIRED elementary ui-gadget x11 dlog vconf)
+
+FOREACH(flag ${pkgs_phone-lockug_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl, --rpath=${PREFIX}/lib -pie")
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+
+ADD_LIBRARY(${PHONE_LOCK_UG_EFL_UG} SHARED
+ ./src/phone-lock-efl.c
+)
+#SET_TARGET_PROPERTIES(${PHONE_LOCK_UG_EFL_UG} PROPERTIES SOVERSION 0.1.0)
+TARGET_LINK_LIBRARIES(${PHONE_LOCK_UG_EFL_UG} -L${CMAKE_BINARY_COMMON_DIR} -lphone-lock-common ${pkgs_phone-lockug_LDFLAGS})
+#TARGET_LINK_LIBRARIES(${PHONE_LOCK_UG_EFL_UG} ${pkgs_phone-lockug_LDFLAGS})
+
+INSTALL(TARGETS ${PHONE_LOCK_UG_EFL_UG} DESTINATION /opt/ug/lib)
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#ifndef __PHONE_LOCK_EFL_H__
+#define __PHONE_LOCK_EFL_H__
+
+#include <Elementary.h>
+#include <libintl.h>
+#include "phone-lock-view.h"
+
+#define PKGNAME "ug-phone-lock-efl"
+
+#define _EDJ(o) elm_layout_edje_get(o)
+#define _(s) dgettext(PKGNAME, s)
+#define dgettext_noop(s) (s)
+#define N_(s) dgettext_noop(s)
+
+#endif /* __PHONE_LOCK_EFL_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * This file is part of <phone-lock>
+ * Written by <Seungtaek Chung> <seungtaek.chung@samsung.com>, <Mi-Ju Lee> <miju52.lee@samsung.com>, <Xi Zhichan> <zhichan.xi@samsung.com>
+ *
+ * PROPRIETARY/CONFIDENTIAL
+ *
+ * This software is the confidential and proprietary information of SAMSUNG ELECTRONICS ("Confidential Information").
+ * You shall not disclose such Confidential Information and shall use it only in accordance
+ * with the terms of the license agreement you entered into with SAMSUNG ELECTRONICS.
+ * SAMSUNG make no representations or warranties about the suitability of the software,
+ * either express or implied, including but not limited to the implied warranties of merchantability,
+ * fitness for a particular purpose, or non-infringement.
+ * SAMSUNG shall not be liable for any damages suffered by licensee as a result of using,
+ * modifying or distributing this software or its derivatives.
+ *
+ */
+
+#ifndef UG_MODULE_API
+#define UG_MODULE_API __attribute__ ((visibility("default")))
+#endif
+
+#include <Elementary.h>
+#include <ui-gadget-module.h>
+#include <bundle.h>
+#include <Ecore_X.h>
+#include <utilX.h>
+#include <vconf.h>
+#include <vconf-keys.h>
+
+#include "phone-lock-util.h"
+#include "phone-lock-view.h"
+#include "phone-lock-string.h"
+#include "phone-lock-verification.h"
+#include "phone-lock-gadget.h"
+
+#include "phone-lock-efl.h"
+
+struct phone_lock_ug_data {
+ Evas_Object *base;
+ struct ui_gadget *ug;
+
+ phone_lock_view_data_t *phone_lock_view_data;
+
+ struct ui_gadget *ug_dialer;
+ Ecore_Event_Handler *event_handler;
+};
+
+void
+_phone_lock_ug_send_result(struct phone_lock_ug_data *phone_lock_ugdata,
+ char *name, char *result)
+{
+ bundle *b;
+
+ b = bundle_create();
+ bundle_add(b, "name", name);
+ bundle_add(b, "result", result);
+
+ ug_send_result(phone_lock_ugdata->ug, b);
+
+ bundle_free(b);
+}
+
+static void _phone_lock_ug_gadget_destroy_cb(void *user_data)
+{
+ PHONE_LOCK_DBG("");
+ phone_lock_view_data_t *phone_lock_view_data = NULL;
+ struct phone_lock_ug_data *phone_lock_ugdata =
+ (struct phone_lock_ug_data *)user_data;
+ if (!phone_lock_ugdata) {
+ return;
+ }
+ phone_lock_ugdata->ug_dialer = NULL;
+ phone_lock_view_data = phone_lock_ugdata->phone_lock_view_data;
+
+ if (phone_lock_view_data) {
+ phone_lock_view_reset_callug_launch_flag(phone_lock_view_data);
+ phone_lock_view_show_imf_context_input_panel
+ (phone_lock_view_data);
+ }
+}
+
+static void _phone_lock_ug_view_cb(int type, char *str, void *user_data)
+{
+ struct phone_lock_ug_data *phone_lock_ugdata =
+ (struct phone_lock_ug_data *)user_data;
+ phone_lock_view_type_t phone_lock_view_type;
+
+ char buf[512];
+ int ret;
+
+ phone_lock_view_type =
+ phone_lock_view_get_type(phone_lock_ugdata->phone_lock_view_data);
+
+ if (phone_lock_view_type == PHONE_LOCK_VIEW_TYPE_PHONE_LOCK) {
+ switch (type) {
+ case 1:
+ phone_lock_ugdata->ug_dialer = (struct ui_gadget *)
+ phone_lock_gadget_show_dialer(ug_get_window(),
+ phone_lock_ugdata->ug,
+ _phone_lock_ug_gadget_destroy_cb,
+ phone_lock_ugdata);
+ break;
+ case 2:
+ PHONE_LOCK_DBG("%s, str : %s", __FUNCTION__, str);
+ ret = phone_lock_verification_check_length(str, 4, 16);
+ if (ret == 0) {
+ if (phone_lock_verification_check_phone_password
+ (str)) {
+ phone_lock_view_reset_attempts_num
+ (phone_lock_ugdata->phone_lock_view_data);
+ phone_lock_view_set_right_password_flag
+ (phone_lock_ugdata->phone_lock_view_data);
+ _phone_lock_ug_send_result(phone_lock_ugdata, "phonelock-ug", "success");
+ PHONE_LOCK_DBG("password verified. Unlock!\n");
+ ug_destroy_me(phone_lock_ugdata->ug);
+ } else {
+ phone_lock_view_check_attempts_left(phone_lock_ugdata->phone_lock_view_data); /*new request */
+ }
+ } else if (ret ==
+ IDS_IDLE_BODY_PD_TO_PD_DIGITS_OR_LETTERS_REQUIRED) {
+ snprintf(buf, sizeof(buf),
+ phone_lock_get_string
+ (IDS_IDLE_BODY_PD_TO_PD_DIGITS_OR_LETTERS_REQUIRED),
+ 4, 16);
+ phone_lock_view_show_msg(phone_lock_ugdata->
+ phone_lock_view_data,
+ buf);
+ } else if (ret == IDS_IDLE_BODY_PASSWORD_EMPTY) {
+ phone_lock_view_show_msg
+ (phone_lock_ugdata->phone_lock_view_data,
+ phone_lock_get_string
+ (IDS_IDLE_BODY_PASSWORD_EMPTY));
+ }
+ break;
+ case 3:
+ _phone_lock_ug_send_result(phone_lock_ugdata,
+ "phone-lock-ug-alpha", str);
+ break;
+ default:
+ PHONE_LOCK_DBG("invalid type\n");
+ break;
+ }
+ } else if (phone_lock_view_type == PHONE_LOCK_VIEW_TYPE_PIN_LOCK) {
+ } else {
+ PHONE_LOCK_DBG("invalid view type\n");
+ }
+
+}
+
+static Eina_Bool _phone_lock_ug_keydown_cb(void *data, int type, void *event)
+{
+ PHONE_LOCK_DBG("");
+
+ Ecore_Event_Key *ev = event;
+ struct phone_lock_ug_data *phone_lock_ugdata =
+ (struct phone_lock_ug_data *)data;
+
+ if (!strcmp(ev->keyname, KEY_END) || !strcmp(ev->keyname, KEY_SELECT)) {
+ if (phone_lock_ugdata != NULL) {
+ if (phone_lock_ugdata->ug_dialer != NULL) {
+ ug_destroy(phone_lock_ugdata->ug_dialer);
+ phone_lock_ugdata->ug_dialer = NULL;
+ }
+ }
+ }
+
+ return ECORE_CALLBACK_PASS_ON;
+}
+
+static void _phone_lock_ug_key_grab(struct phone_lock_ug_data
+ *phone_lock_ugdata)
+{
+ Ecore_X_Window xwin;
+ Ecore_X_Display *disp = NULL;
+ int r = 0;
+
+ if (phone_lock_ugdata == NULL) {
+ return;
+ }
+ disp = ecore_x_display_get();
+ xwin = elm_win_xwindow_get((Evas_Object *) ug_get_window());
+
+ r = utilx_grab_key(disp, xwin, KEY_SELECT, TOP_POSITION_GRAB);
+ if (r) {
+ return;
+ }
+ phone_lock_ugdata->event_handler =
+ ecore_event_handler_add(ECORE_EVENT_KEY_DOWN,
+ _phone_lock_ug_keydown_cb,
+ phone_lock_ugdata);
+}
+
+static void _phone_lock_ug_key_ungrab(struct phone_lock_ug_data
+ *phone_lock_ugdata)
+{
+ Ecore_X_Window xwin;
+ Ecore_X_Display *disp = NULL;
+ int r = 0;
+
+ if (phone_lock_ugdata == NULL) {
+ return;
+ }
+
+ disp = ecore_x_display_get();
+ xwin = elm_win_xwindow_get((Evas_Object *) ug_get_window());
+
+ r = utilx_ungrab_key(disp, xwin, KEY_SELECT);
+ if (r) {
+ return;
+ }
+
+ ecore_event_handler_del(phone_lock_ugdata->event_handler);
+}
+
+static void _phone_lock_ug_pm_state_cb(keynode_t * node, void *data)
+{
+ struct phone_lock_ug_data *phone_lock_ugdata =
+ (struct phone_lock_ug_data *)data;
+ int val;
+
+ if (phone_lock_ugdata == NULL) {
+ PHONE_LOCK_WARN("");
+ return;
+ }
+
+ if (vconf_get_int(VCONFKEY_PM_STATE, &val) < 0) {
+ PHONE_LOCK_WARN("Fail get vconf : VCONFKEY_PM_STATE");
+ return;
+ }
+
+ if (val == VCONFKEY_PM_STATE_LCDOFF) {
+ if (phone_lock_ugdata->ug_dialer != NULL) {
+ ug_destroy(phone_lock_ugdata->ug_dialer);
+ phone_lock_ugdata->ug_dialer = NULL;
+ }
+ }
+}
+
+static void _phone_lock_ug_init_vconf(struct phone_lock_ug_data
+ *phone_lock_ugdata)
+{
+ if (vconf_notify_key_changed
+ (VCONFKEY_PM_STATE, _phone_lock_ug_pm_state_cb,
+ phone_lock_ugdata) != 0) {
+ PHONE_LOCK_ERR
+ ("Fail vconf_notify_key_changed : VCONFKEY_PM_STATE");
+ }
+}
+
+static void _phone_lock_ug_fini_vconf(struct phone_lock_ug_data
+ *phone_lock_ugdata)
+{
+ if (vconf_ignore_key_changed
+ (VCONFKEY_PM_STATE, _phone_lock_ug_pm_state_cb)
+ != 0) {
+ PHONE_LOCK_ERR
+ ("Fail vconf_ignore_key_changed : VCONFKEY_PM_STATE");
+ }
+}
+
+static void *phone_lock_ug_on_create(struct ui_gadget *ug, enum ug_mode mode,
+ bundle * data, void *priv)
+{
+ PHONE_LOCK_DBG("%s", __FUNCTION__);
+
+ struct phone_lock_ug_data *phone_lock_ugdata;
+ phone_lock_view_type_t view_type;
+ phone_lock_window_type_t window_type;
+ const char *val1;
+ const char *val2;
+
+ if (!ug || !priv)
+ return NULL;
+
+ bindtextdomain(PACKAGE, LOCALEDIR);
+
+ phone_lock_ugdata = priv;
+ phone_lock_ugdata->ug = ug;
+
+ val1 = bundle_get_val(data, "phone-lock-type");
+ PHONE_LOCK_DBG("phone lock type : %s\n", val1);
+
+ if (val1 == NULL)
+ return NULL;
+
+ if (!strcmp(val1, "phone-lock")) {
+ view_type = PHONE_LOCK_VIEW_TYPE_PHONE_LOCK;
+ } else if (!strcmp(val1, "pin-lock")) {
+ view_type = PHONE_LOCK_VIEW_TYPE_PIN_LOCK;
+ } else {
+ PHONE_LOCK_DBG("Error. Invalied phone lock type.\n");
+ return NULL;
+ }
+
+ val2 = bundle_get_val(data, "window-type");
+ PHONE_LOCK_DBG("window type : %s\n", val2);
+
+ if (val2 == NULL)
+ return NULL;
+
+ if (!strcmp(val2, "normal")) {
+ window_type = PHONE_LOCK_WINDOW_TYPE_NORMAL;
+ } else if (!strcmp(val2, "alpha")) {
+ window_type = PHONE_LOCK_WINDOW_TYPE_ALPHA;
+ } else {
+ PHONE_LOCK_DBG("Error. Invalied window type.\n");
+ window_type = PHONE_LOCK_WINDOW_TYPE_NORMAL;
+ }
+
+ _phone_lock_ug_key_grab(phone_lock_ugdata);
+
+ _phone_lock_ug_init_vconf(phone_lock_ugdata);
+
+ phone_lock_ugdata->phone_lock_view_data =
+ phone_lock_view_create(view_type, window_type,
+ (Evas_Object *) ug_get_window(),
+ (void *)_phone_lock_ug_view_cb,
+ phone_lock_ugdata);
+
+ phone_lock_ugdata->base =
+ phone_lock_view_get_layoutmain
+ (phone_lock_ugdata->phone_lock_view_data);
+
+ return phone_lock_ugdata->base;
+}
+
+static void phone_lock_ug_on_start(struct ui_gadget *ug, bundle * data,
+ void *priv)
+{
+ PHONE_LOCK_DBG("%s", __FUNCTION__);
+}
+
+static void phone_lock_ug_on_pause(struct ui_gadget *ug, bundle * data,
+ void *priv)
+{
+ PHONE_LOCK_DBG("%s", __FUNCTION__);
+}
+
+static void phone_lock_ug_on_resume(struct ui_gadget *ug, bundle * data,
+ void *priv)
+{
+ PHONE_LOCK_DBG("%s", __FUNCTION__);
+}
+
+static void phone_lock_ug_on_destroy(struct ui_gadget *ug, bundle * data,
+ void *priv)
+{
+ PHONE_LOCK_DBG("%s", __FUNCTION__);
+
+ struct phone_lock_ug_data *phone_lock_ugdata;
+ phone_lock_view_data_t *phone_lock_view_data;
+
+ if (!ug || !priv)
+ return;
+
+ phone_lock_ugdata = priv;
+ phone_lock_view_data = phone_lock_ugdata->phone_lock_view_data;
+
+ if (!phone_lock_view_data) {
+ return;
+ }
+
+ _phone_lock_ug_fini_vconf(phone_lock_ugdata);
+ _phone_lock_ug_key_ungrab(phone_lock_ugdata);
+
+ phone_lock_view_destroy(phone_lock_view_data);
+
+ if (phone_lock_ugdata->base) {
+ evas_object_del(phone_lock_ugdata->base);
+ phone_lock_ugdata->base = NULL;
+ }
+}
+
+static void phone_lock_ug_on_message(struct ui_gadget *ug, bundle * msg,
+ bundle * data, void *priv)
+{
+ PHONE_LOCK_DBG("%s", __FUNCTION__);
+}
+
+static void phone_lock_ug_on_event(struct ui_gadget *ug, enum ug_event event,
+ bundle * data, void *priv)
+{
+ PHONE_LOCK_DBG("%s, event : %d", __FUNCTION__, event);
+
+ switch (event) {
+ case UG_EVENT_LOW_MEMORY:
+ break;
+ case UG_EVENT_LOW_BATTERY:
+ break;
+ case UG_EVENT_LANG_CHANGE:
+ break;
+ case UG_EVENT_ROTATE_PORTRAIT:
+ break;
+ case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN:
+ break;
+ case UG_EVENT_ROTATE_LANDSCAPE:
+ break;
+ case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN:
+ break;
+ default:
+ break;
+ }
+}
+
+static void phone_lock_ug_on_key_event(struct ui_gadget *ug,
+ enum ug_key_event event, bundle * data,
+ void *priv)
+{
+ PHONE_LOCK_DBG("%s, event : %d", __FUNCTION__, event);
+
+ if (!ug)
+ return;
+
+ switch (event) {
+ case UG_KEY_EVENT_END:
+ ug_destroy_me(ug);
+ break;
+ default:
+ break;
+ }
+}
+
+UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops)
+{
+ PHONE_LOCK_DBG("%s", __FUNCTION__);
+
+ struct phone_lock_ug_data *phone_lock_ugdata;
+
+ if (!ops)
+ return -1;
+
+ phone_lock_ugdata = calloc(1, sizeof(struct phone_lock_ug_data));
+
+ if (!phone_lock_ugdata)
+ return -1;
+
+ ops->create = phone_lock_ug_on_create;
+ ops->start = phone_lock_ug_on_start;
+ ops->pause = phone_lock_ug_on_pause;
+ ops->resume = phone_lock_ug_on_resume;
+ ops->destroy = phone_lock_ug_on_destroy;
+ ops->message = phone_lock_ug_on_message;
+ ops->event = phone_lock_ug_on_event;
+ ops->key_event = phone_lock_ug_on_key_event;
+ ops->priv = phone_lock_ugdata;
+ ops->opt = UG_OPT_INDICATOR_ENABLE;
+
+ return 0;
+}
+
+UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops)
+{
+ PHONE_LOCK_DBG("%s", __FUNCTION__);
+
+ struct phone_lock_ug_data *phone_lock_ugdata;
+
+ if (!ops)
+ return;
+
+ phone_lock_ugdata = ops->priv;
+
+ if (phone_lock_ugdata) {
+ free(phone_lock_ugdata);
+ phone_lock_ugdata = NULL;
+ }
+}
--- /dev/null
+# for i18n
+
+SET(POFILES de_DE.po el_GR.po en.po es_ES.po fr_FR.po it_IT.po ja_JP.po ko_KR.po nl_NL.po pt_PT.po ru_RU.po tr_TR.po zh_CN.po zh_HK.po zh_TW.po)
+
+SET(MSGFMT "/usr/bin/msgfmt")
+
+FOREACH(pofile ${POFILES})
+ SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})
+ MESSAGE("PO: ${pofile}")
+ GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE)
+ GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE)
+ SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo)
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${moFile}
+ COMMAND ${MSGFMT} -o ${moFile} ${absPofile}
+ DEPENDS ${absPofile}
+ )
+ INSTALL(FILES ${moFile}
+ DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+ SET(moFiles ${moFiles} ${moFile})
+ENDFOREACH(pofile)
+
+MESSAGE(".mo files: ${moFiles}")
+ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})
--- /dev/null
+msgid "IDS_IDLE_BODY_PASSWORD_EMPTY"
+msgstr "Passwort leer"
+
+msgid "IDS_IDLE_BODY_PD_ATTEMPTS_LEFT"
+msgstr "%d Versuche übrig"
+
+msgid "IDS_IDLE_BODY_WRONG_PASSWORD"
+msgstr "Falsches Passwort"
+
+msgid "IDS_IDLE_BODY_EMERGENCY_CALL"
+msgstr "Notruf"
+
--- /dev/null
+msgid "IDS_IDLE_BODY_PASSWORD_EMPTY"
+msgstr "Δεν έχει οριστεί κωδικός πρόσβασης"
+
+msgid "IDS_IDLE_BODY_PD_ATTEMPTS_LEFT"
+msgstr "%d προσπάθειες απομένουν"
+
+msgid "IDS_IDLE_BODY_WRONG_PASSWORD"
+msgstr "Λάθος κωδικός"
+
+msgid "IDS_IDLE_BODY_EMERGENCY_CALL"
+msgstr "Κλήση έκτακτης ανάγκης"
+
--- /dev/null
+msgid "IDS_IDLE_BODY_PASSWORD_EMPTY"
+msgstr "Password empty"
+
+msgid "IDS_IDLE_BODY_PD_ATTEMPTS_LEFT"
+msgstr "%d attempts left"
+
+msgid "IDS_IDLE_BODY_WRONG_PASSWORD"
+msgstr "Wrong password"
+
+msgid "IDS_IDLE_BODY_EMERGENCY_CALL"
+msgstr "Emergency call"
+
--- /dev/null
+msgid "IDS_IDLE_BODY_PASSWORD_EMPTY"
+msgstr "Contraseña vacía"
+
+msgid "IDS_IDLE_BODY_PD_ATTEMPTS_LEFT"
+msgstr "Quedan %d intentos"
+
+msgid "IDS_IDLE_BODY_WRONG_PASSWORD"
+msgstr "Contraseña incorrecta"
+
+msgid "IDS_IDLE_BODY_EMERGENCY_CALL"
+msgstr "Llamada de emergencia"
+
--- /dev/null
+msgid "IDS_IDLE_BODY_PASSWORD_EMPTY"
+msgstr "Mot de passe vide"
+
+msgid "IDS_IDLE_BODY_PD_ATTEMPTS_LEFT"
+msgstr "%d essais restants"
+
+msgid "IDS_IDLE_BODY_WRONG_PASSWORD"
+msgstr "Mot de passe incorrect"
+
+msgid "IDS_IDLE_BODY_EMERGENCY_CALL"
+msgstr "Appel d'urgence"
+
--- /dev/null
+msgid "IDS_IDLE_BODY_PASSWORD_EMPTY"
+msgstr "Password vuota"
+
+msgid "IDS_IDLE_BODY_PD_ATTEMPTS_LEFT"
+msgstr "%d tentativi possibili"
+
+msgid "IDS_IDLE_BODY_WRONG_PASSWORD"
+msgstr "Password errata"
+
+msgid "IDS_IDLE_BODY_EMERGENCY_CALL"
+msgstr "Chiamata di emergenza"
+
--- /dev/null
+msgid "IDS_IDLE_BODY_PASSWORD_EMPTY"
+msgstr "パスワードを入力"
+
+msgid "IDS_IDLE_BODY_PD_ATTEMPTS_LEFT"
+msgstr "残りの試行回数:%d"
+
+msgid "IDS_IDLE_BODY_WRONG_PASSWORD"
+msgstr "不正なパスワード"
+
+msgid "IDS_IDLE_BODY_EMERGENCY_CALL"
+msgstr "緊急通話"
+
--- /dev/null
+msgid "IDS_IDLE_BODY_PASSWORD_EMPTY"
+msgstr "비밀번호를 입력하세요"
+
+msgid "IDS_IDLE_BODY_PD_ATTEMPTS_LEFT"
+msgstr "재입력 기회가 %d회 남았습니다"
+
+msgid "IDS_IDLE_BODY_WRONG_PASSWORD"
+msgstr "비밀번호가 바르지 않습니다"
+
+msgid "IDS_IDLE_BODY_EMERGENCY_CALL"
+msgstr "긴급전화"
+
--- /dev/null
+msgid "IDS_IDLE_BODY_PASSWORD_EMPTY"
+msgstr "Wachtwoord leeg"
+
+msgid "IDS_IDLE_BODY_PD_ATTEMPTS_LEFT"
+msgstr "%d pogingen over"
+
+msgid "IDS_IDLE_BODY_WRONG_PASSWORD"
+msgstr "Wachtwoord onjuist"
+
+msgid "IDS_IDLE_BODY_EMERGENCY_CALL"
+msgstr "Noodoproep"
+
--- /dev/null
+msgid "IDS_IDLE_BODY_PASSWORD_EMPTY"
+msgstr "Palavra-passe vazia"
+
+msgid "IDS_IDLE_BODY_PD_ATTEMPTS_LEFT"
+msgstr "%d tentativas restantes"
+
+msgid "IDS_IDLE_BODY_WRONG_PASSWORD"
+msgstr "Palavra-passe incorrecta"
+
+msgid "IDS_IDLE_BODY_EMERGENCY_CALL"
+msgstr "Chamada de emergência"
+
--- /dev/null
+msgid "IDS_IDLE_BODY_PASSWORD_EMPTY"
+msgstr "Пароль пустой"
+
+msgid "IDS_IDLE_BODY_PD_ATTEMPTS_LEFT"
+msgstr "Осталось попыток: %d"
+
+msgid "IDS_IDLE_BODY_WRONG_PASSWORD"
+msgstr "Неправильный пароль"
+
+msgid "IDS_IDLE_BODY_EMERGENCY_CALL"
+msgstr "Экстренный вызов"
+
--- /dev/null
+msgid "IDS_IDLE_BODY_PASSWORD_EMPTY"
+msgstr "Parola boş"
+
+msgid "IDS_IDLE_BODY_PD_ATTEMPTS_LEFT"
+msgstr "%d deneme kaldı"
+
+msgid "IDS_IDLE_BODY_WRONG_PASSWORD"
+msgstr "Yanlış şifre"
+
+msgid "IDS_IDLE_BODY_EMERGENCY_CALL"
+msgstr "Acil arama"
+
--- /dev/null
+msgid "IDS_IDLE_BODY_PASSWORD_EMPTY"
+msgstr "密码为空"
+
+msgid "IDS_IDLE_BODY_PD_ATTEMPTS_LEFT"
+msgstr "还有 %d 次机会"
+
+msgid "IDS_IDLE_BODY_WRONG_PASSWORD"
+msgstr "密码不符"
+
+msgid "IDS_IDLE_BODY_EMERGENCY_CALL"
+msgstr "紧急呼叫"
+
--- /dev/null
+msgid "IDS_IDLE_BODY_PASSWORD_EMPTY"
+msgstr "密碼空白"
+
+msgid "IDS_IDLE_BODY_PD_ATTEMPTS_LEFT"
+msgstr "剩餘 %d 次機會"
+
+msgid "IDS_IDLE_BODY_WRONG_PASSWORD"
+msgstr "密碼錯誤"
+
+msgid "IDS_IDLE_BODY_EMERGENCY_CALL"
+msgstr "緊急通話"
+
--- /dev/null
+msgid "IDS_IDLE_BODY_PASSWORD_EMPTY"
+msgstr "密碼為空"
+
+msgid "IDS_IDLE_BODY_PD_ATTEMPTS_LEFT"
+msgstr "剩餘 %d 次嘗試機會"
+
+msgid "IDS_IDLE_BODY_WRONG_PASSWORD"
+msgstr "密碼錯誤"
+
+msgid "IDS_IDLE_BODY_EMERGENCY_CALL"
+msgstr "緊急電話"
+