From effaa6616abc114b32b4a347ebdc86c5a8849f12 Mon Sep 17 00:00:00 2001 From: Kim Kibum Date: Mon, 9 Apr 2012 12:12:32 +0900 Subject: [PATCH] Tizen release 1.0 --- CMakeLists.txt | 61 + INSTALL | 33 + NOTICE | 1 + data/CMakeLists.txt | 36 + data/images/B07_button_ok_normal_center.png | Bin 0 -> 459 bytes data/images/B07_button_ok_normal_left.png | Bin 0 -> 497 bytes data/images/B07_button_ok_normal_right.png | Bin 0 -> 490 bytes data/images/B07_button_ok_press_center.png | Bin 0 -> 469 bytes data/images/B07_button_ok_press_left.png | Bin 0 -> 519 bytes data/images/B07_button_ok_press_right.png | Bin 0 -> 521 bytes data/images/B07_event_action_arrow.png | Bin 0 -> 225 bytes data/images/B07_event_action_bg_head_CT.png | Bin 0 -> 455 bytes data/images/B07_event_action_bg_tail01_CT.png | Bin 0 -> 694 bytes data/images/B07_event_action_bg_tail02_CT.png | Bin 0 -> 680 bytes data/images/B07_event_action_emergency.png | Bin 0 -> 1097 bytes data/images/B07_event_action_emergency_arrow.png | Bin 0 -> 3010 bytes .../B07_event_action_emergency_arrow_press.png | Bin 0 -> 3044 bytes data/org.tizen.phone-lock.desktop.in | 9 + data/phone-lock-view-entry.edc | 2404 ++++++++++++++++++++ data/phone-lock-view-event.edc | 165 ++ data/phone-lock-view-info.edc | 61 + data/phone-lock-view-input-simple.edc | 208 ++ data/phone-lock-view-input.edc | 334 +++ data/phone-lock-view-main-simple.edc | 224 ++ data/phone-lock-view-main.edc | 221 ++ data/phone-lock-view.edc | 40 + data/phone-lock.edc | 108 + debian/changelog | 63 + debian/compat | 1 + debian/control | 17 + debian/org.tizen.phone-lock.install.in | 8 + debian/org.tizen.phone-lock.postinst | 20 + debian/rules | 119 + packaging/org.tizen.phone-lock.spec | 61 + phone-lock-common/CMakeLists.txt | 30 + phone-lock-common/include/phone-lock-gadget.h | 31 + phone-lock-common/include/phone-lock-string.h | 56 + phone-lock-common/include/phone-lock-util.h | 58 + .../include/phone-lock-verification.h | 27 + phone-lock-common/include/phone-lock-view.h | 81 + phone-lock-common/src/phone-lock-gadget.c | 111 + phone-lock-common/src/phone-lock-string.c | 60 + phone-lock-common/src/phone-lock-util.c | 208 ++ phone-lock-common/src/phone-lock-verification.c | 76 + phone-lock-common/src/phone-lock-view.c | 2181 ++++++++++++++++++ phone-lock-main/CMakeLists.txt | 28 + phone-lock-main/include/phone-lock-ui.h | 27 + phone-lock-main/include/phone-lock.h | 56 + phone-lock-main/src/phone-lock-ui.c | 143 ++ phone-lock-main/src/phone-lock.c | 407 ++++ phone-lock-ug-efl/CMakeLists.txt | 26 + phone-lock-ug-efl/include/phone-lock-efl.h | 34 + phone-lock-ug-efl/src/phone-lock-efl.c | 468 ++++ po/CMakeLists.txt | 24 + po/de_DE.po | 12 + po/el_GR.po | 12 + po/en.po | 12 + po/es_ES.po | 12 + po/fr_FR.po | 12 + po/it_IT.po | 12 + po/ja_JP.po | 12 + po/ko_KR.po | 12 + po/nl_NL.po | 12 + po/pt_PT.po | 12 + po/ru_RU.po | 12 + po/tr_TR.po | 12 + po/zh_CN.po | 12 + po/zh_HK.po | 12 + po/zh_TW.po | 12 + sb-conf | 0 70 files changed, 8506 insertions(+) create mode 100755 CMakeLists.txt create mode 100755 INSTALL create mode 100755 NOTICE create mode 100755 data/CMakeLists.txt create mode 100755 data/images/B07_button_ok_normal_center.png create mode 100755 data/images/B07_button_ok_normal_left.png create mode 100755 data/images/B07_button_ok_normal_right.png create mode 100755 data/images/B07_button_ok_press_center.png create mode 100755 data/images/B07_button_ok_press_left.png create mode 100755 data/images/B07_button_ok_press_right.png create mode 100755 data/images/B07_event_action_arrow.png create mode 100755 data/images/B07_event_action_bg_head_CT.png create mode 100755 data/images/B07_event_action_bg_tail01_CT.png create mode 100755 data/images/B07_event_action_bg_tail02_CT.png create mode 100755 data/images/B07_event_action_emergency.png create mode 100755 data/images/B07_event_action_emergency_arrow.png create mode 100755 data/images/B07_event_action_emergency_arrow_press.png create mode 100755 data/org.tizen.phone-lock.desktop.in create mode 100755 data/phone-lock-view-entry.edc create mode 100755 data/phone-lock-view-event.edc create mode 100755 data/phone-lock-view-info.edc create mode 100755 data/phone-lock-view-input-simple.edc create mode 100755 data/phone-lock-view-input.edc create mode 100755 data/phone-lock-view-main-simple.edc create mode 100755 data/phone-lock-view-main.edc create mode 100755 data/phone-lock-view.edc create mode 100755 data/phone-lock.edc create mode 100755 debian/changelog create mode 100755 debian/compat create mode 100755 debian/control create mode 100755 debian/org.tizen.phone-lock.install.in create mode 100755 debian/org.tizen.phone-lock.postinst create mode 100755 debian/rules create mode 100755 packaging/org.tizen.phone-lock.spec create mode 100755 phone-lock-common/CMakeLists.txt create mode 100755 phone-lock-common/include/phone-lock-gadget.h create mode 100755 phone-lock-common/include/phone-lock-string.h create mode 100755 phone-lock-common/include/phone-lock-util.h create mode 100755 phone-lock-common/include/phone-lock-verification.h create mode 100755 phone-lock-common/include/phone-lock-view.h create mode 100755 phone-lock-common/src/phone-lock-gadget.c create mode 100755 phone-lock-common/src/phone-lock-string.c create mode 100755 phone-lock-common/src/phone-lock-util.c create mode 100755 phone-lock-common/src/phone-lock-verification.c create mode 100755 phone-lock-common/src/phone-lock-view.c create mode 100755 phone-lock-main/CMakeLists.txt create mode 100755 phone-lock-main/include/phone-lock-ui.h create mode 100755 phone-lock-main/include/phone-lock.h create mode 100755 phone-lock-main/src/phone-lock-ui.c create mode 100755 phone-lock-main/src/phone-lock.c create mode 100755 phone-lock-ug-efl/CMakeLists.txt create mode 100755 phone-lock-ug-efl/include/phone-lock-efl.h create mode 100755 phone-lock-ug-efl/src/phone-lock-efl.c create mode 100755 po/CMakeLists.txt create mode 100755 po/de_DE.po create mode 100755 po/el_GR.po create mode 100755 po/en.po create mode 100755 po/es_ES.po create mode 100755 po/fr_FR.po create mode 100755 po/it_IT.po create mode 100755 po/ja_JP.po create mode 100755 po/ko_KR.po create mode 100755 po/nl_NL.po create mode 100755 po/pt_PT.po create mode 100755 po/ru_RU.po create mode 100755 po/tr_TR.po create mode 100755 po/zh_CN.po create mode 100755 po/zh_HK.po create mode 100755 po/zh_TW.po create mode 100755 sb-conf diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100755 index 0000000..87ca9c5 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,61 @@ +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) + diff --git a/INSTALL b/INSTALL new file mode 100755 index 0000000..3915bad --- /dev/null +++ b/INSTALL @@ -0,0 +1,33 @@ +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 + diff --git a/NOTICE b/NOTICE new file mode 100755 index 0000000..ded3804 --- /dev/null +++ b/NOTICE @@ -0,0 +1 @@ +Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. \ No newline at end of file diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt new file mode 100755 index 0000000..b1710e6 --- /dev/null +++ b/data/CMakeLists.txt @@ -0,0 +1,36 @@ +# 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 diff --git a/data/images/B07_button_ok_normal_center.png b/data/images/B07_button_ok_normal_center.png new file mode 100755 index 0000000000000000000000000000000000000000..7d6486e839501e4b80e61cae81d7ccd3f8631bba GIT binary patch literal 459 zcmeAS@N?(olHy`uVBq!ia0vp^OhD|x!3HGnl&a_fDb50q$YKTtZeb8+WSBKa0w~Cm z?&#~tz_78e=6B#^AYUQbBgmJ5p-Pp3p`n?9;pcxK{gQ#9)PRBERRRNp)eHs(@%%~g zN8K107#%%b978H@C8Z=JWH2PLH83P4H83?WG#N86ahzk|P_STDXn4RgDu63I3>bc0 WXB7Bgl(+;K@C=@=elF{r5}E*@1Z+b9 literal 0 HcmV?d00001 diff --git a/data/images/B07_button_ok_normal_left.png b/data/images/B07_button_ok_normal_left.png new file mode 100755 index 0000000000000000000000000000000000000000..3990623ea54a1b4123397a09ffc9cb4d7b366972 GIT binary patch literal 497 zcmeAS@N?(olHy`uVBq!ia0vp^%s}kH!3HFaxBCkKDb50q$YKTtZeb8+WSBKa0w~Cm z?&#~tz_78e=6B#^AYUQbBgmJ5p-Pp3p`n?9;pcxK{gQ#9)PRBERRRNp)eHs(@%%~g zN8K107}Gsn978H@C8Z=JB(Ns&D_mpZP!Lmi$Z+JC!x;tv2Oo!=Qw*#Oj4Y2f9JF9y zJaVLgg@K8qm07?+L#Bbj=^+D)02jMLLjX{&f(V}j!@`1*s^rK|uE)R-F%~Fh o+$hrl3?zkf&KdiJSvU+BqDq+0727ar0;7k))78&qol`;+04RTL)c^nh literal 0 HcmV?d00001 diff --git a/data/images/B07_button_ok_normal_right.png b/data/images/B07_button_ok_normal_right.png new file mode 100755 index 0000000000000000000000000000000000000000..e88bafe320d0d143cc02849af9bf1c22beeb47c5 GIT binary patch literal 490 zcmeAS@N?(olHy`uVBq!ia0vp^%s}kH!3HFaxBCkKDb50q$YKTtZeb8+WSBKa0w~Cm z?&#~tz_78e=6B#^AYUQbBgmJ5p-Pp3p`n?9;pcxK{gQ#9)PRBERRRNp)eHs(@%%~g zN8K107!y2Q978H@C8Z@KXs{F_!ux=7(8A5T-G@yGywqONp9)@ literal 0 HcmV?d00001 diff --git a/data/images/B07_button_ok_press_center.png b/data/images/B07_button_ok_press_center.png new file mode 100755 index 0000000000000000000000000000000000000000..71c5f8cb12611f50280d977e1b962a7dc4912e3d GIT binary patch literal 469 zcmeAS@N?(olHy`uVBq!ia0vp^OhD|x!3HGnl&a_fDb50q$YKTtZeb8+WSBKa0w~Cm z?&#~tz_78e=6B#^AYUQbBgmJ5p-Pp3p`n?9;pcxK{gQ#9)PRBERRRNp)eHs(@%%~g zN8K107`;7R978H@CD~k5`Y@l7gMq2Tb;5jZ7h?t%0bynlAUTIoz@dQ6f#IMe10zfN nr~pQIoc`T^{{T+|12coxPuBPM|IglutWZgzJ>pT z9!K!=h6tV0cQTpOJ@HmgNnej|f<4PQ?+0}(_xvBsR}5tox@L4n6sVuU)78&qol`;+ E0Mll0egFUf literal 0 HcmV?d00001 diff --git a/data/images/B07_event_action_bg_head_CT.png b/data/images/B07_event_action_bg_head_CT.png new file mode 100755 index 0000000000000000000000000000000000000000..f9fcae46fb148ed33ba753273a57b4d2aefac3e0 GIT binary patch literal 455 zcmeAS@N?(olHy`uVBq!ia0vp^RzPgd!3HE_RU^LvDb50q$YKTtZeb8+WSBKa0w~Cm z?&#~tz_78e=6B#^AYUQbBgmJ5p-Pp3p`n?9;pcxK{gQ#9)PRBERRYk^84L{K`IF+0 zx-l>?+IqS;hE&{2N=ZntIBdYg;J{#L*dxFo;GleLF$1GXk`31=6IVE}F4nJa0`PlBg3pY5AYTTCDpdxChGqtapZ|gMO9qBg0|tgy2@DKYGZ+}e^C!h0 zbz@*)((!b045_%4l#-B;ks!gkI6=gKfkohQhCokKAOj-Ay=iTM23!jm6dK%&4{J!U1~3RXES{Mt(!->|z_H-s83QgiMiB;<3mIuZ0~xp& nm@-U^LB_F;8aI@~&VXUw2Znb){7r!Ah=IY=)z4*}Q$iB}ojtXv literal 0 HcmV?d00001 diff --git a/data/images/B07_event_action_bg_tail02_CT.png b/data/images/B07_event_action_bg_tail02_CT.png new file mode 100755 index 0000000000000000000000000000000000000000..f886cc1399243cbf24a060ff6eccfcd6fc550a06 GIT binary patch literal 680 zcmeAS@N?(olHy`uVBq!ia0vp^2Y}d|gAGVVdAlwHQk(@Ik;M!Q+`=Ht$S`Y;1W=GA z-O<;Pfnj4`&F{d;K)yn_XH9?P? z=Il^)?Mv9j!l9tn7HGibX28I);35x@VKT}Xj)7pnpvzNJq@QWd4@^}Ip00i_>zopr E06-hAK>z>% literal 0 HcmV?d00001 diff --git a/data/images/B07_event_action_emergency.png b/data/images/B07_event_action_emergency.png new file mode 100755 index 0000000000000000000000000000000000000000..57680ba1d99325489bb898495e1fcd6fc842fcc3 GIT binary patch literal 1097 zcmV-P1h)H$P)q$gGRCwCNR^3aJVHAHhUApNq%gV3N zETP!2jONX7N$Fou-Nqb5;9VGsg5hMKXct0P2JS-h(sY85V0NWa`GpEXepKK^exqZG zu6jFXop(Jx@B419A`cw4=Y1ZY-}(5Ra~>v168j%QI68S9|1U3ZZf<6FyPcU#Cbqk~ z%Z7)CSyfdP4=(9I@Gn#GSVsmWfF^>T0FC3VRRdgIT@BqO>dMLrYiw)`ujwwP!^JNn z!l1Ze1WhIb_CW)nd!Ro=P`tFVvXU7L1~xxG&&I~a*yiRYGa8MosHliptyUHc21EN{ z5Cr5rmO)Q~UK$t}@L*`XUhgAVXOZ_hIbWi7baW^pQBhIB_V@Qy&-1`~&?L}{H8nL4 zC6bMejZg5c5cG`93GtGlp&gsAu&}gAfD=sd+6A5^EdASeIfttmOkiA=5Tdbs{L;>pa`680b40?5Oaq+zf*xlXT z<#aml!+s7COp#}7AO!^l3eeix+7P=Vl@oTVY^cYlJm?;X#bS8?dsfiX#0R}vp0RmA zDTd2wW@bjUhSlmg74-Vf&dwSSzOb1O!?ARn8Wnqp8LpA2;Y!=uwMDW?! z*|!9qO#tyUIuS4vjRrkWdj@fwhVeA!FS6Anv{+&hxBo9dW5s3KO z<#OGH^%XK8i6i81OpT`xdTm1M5kMRoa?W9NzJN0~L9c;2`2D%Lxi|0{DdUWjQ={pz zI3{zoz){xL*1o_*t8Zy(d9G&M=;-K696lI9;(;z2Fkh=VI4&{7(jN%)aKFdnagZZX zfqC#GB2FRB=2(HDiF|EnXt)&%FcWGONtBP|!5kh16z4mVl!%rP3$Xb5#9B>9)}jFu z6B9nM#qu+pKr@M~MrjXeKHTGr>9@R_X0X|n9(ZF+gJ_I zQ_UyPlh{aWiJrrLdKw4Cr}5ta^C^%?Xy82iM*5u$VG7{m5Is94`6<8vmfFf@4A%hE P00000NkvXXu0mjf;adHk literal 0 HcmV?d00001 diff --git a/data/images/B07_event_action_emergency_arrow.png b/data/images/B07_event_action_emergency_arrow.png new file mode 100755 index 0000000000000000000000000000000000000000..7b5f9ab729746a22a36fe2d5ab3afd436f623afa GIT binary patch literal 3010 zcmV;z3qACSP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0002(NkluO3YKlmzfBQM+6-1r7T4EA zF<2(}TCOl&5a+zdFm}@AoO{0qp7R{Im7*v_MO9$T9=wL7DEI>UXhq4=#399QC3__!`_VYc?0`6z+%)AZQum!Q5)LC5%$WK&AI;D=#CFN zC;S5sc>PM$Gl8FRhT(WJ2mB7#7?lfufxqDrkKbLG7Cyj5Y9JT<9al+;ALBRhA4W-&7Q4kwI?Dxr!D-oIIpFt6-_f*os?0w{{|^5g0MUmhjQ-n^Bme*a07*qoM6N<$ Eg0f?s-2eap literal 0 HcmV?d00001 diff --git a/data/images/B07_event_action_emergency_arrow_press.png b/data/images/B07_event_action_emergency_arrow_press.png new file mode 100755 index 0000000000000000000000000000000000000000..972cedcb356622960a5848dc470a94e61a84f72c GIT binary patch literal 3044 zcmVKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0003GNklW5W{I~62TJ< zf^%E=3O;}Y(dH(!cw7wR2kZa!o`&d-=brmXOrD`tk*I>2%LF}NssQHowSF91)X zoO+d|1l)bluyUY;KUH=^8%a^y8c zHQ-s46R!y^0X%|8rol+3c9`CGY}#d zv@P(uEn!#q1h}@q{JW&A@K2y)fl->|EbuANvcN3ufm}+(9)WucEVDfGC-^(iOez)w mK3>;%v8zt<|0())_-X(j!ashg5TVon0000 + * Written by , , + * + * 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"; + } + } + } +} diff --git a/data/phone-lock-view-event.edc b/data/phone-lock-view-event.edc new file mode 100755 index 0000000..799a62e --- /dev/null +++ b/data/phone-lock-view-event.edc @@ -0,0 +1,165 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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"; + } + } + } + } + + } + + diff --git a/data/phone-lock-view-info.edc b/data/phone-lock-view-info.edc new file mode 100755 index 0000000..58ef795 --- /dev/null +++ b/data/phone-lock-view-info.edc @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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{ + } + } diff --git a/data/phone-lock-view-input-simple.edc b/data/phone-lock-view-input-simple.edc new file mode 100755 index 0000000..8acf0ff --- /dev/null +++ b/data/phone-lock-view-input-simple.edc @@ -0,0 +1,208 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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") + } +} + + diff --git a/data/phone-lock-view-input.edc b/data/phone-lock-view-input.edc new file mode 100755 index 0000000..65c9955 --- /dev/null +++ b/data/phone-lock-view-input.edc @@ -0,0 +1,334 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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"; + } + } +} + diff --git a/data/phone-lock-view-main-simple.edc b/data/phone-lock-view-main-simple.edc new file mode 100755 index 0000000..8b34b6b --- /dev/null +++ b/data/phone-lock-view-main-simple.edc @@ -0,0 +1,224 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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"; + } + + } +} diff --git a/data/phone-lock-view-main.edc b/data/phone-lock-view-main.edc new file mode 100755 index 0000000..86c0730 --- /dev/null +++ b/data/phone-lock-view-main.edc @@ -0,0 +1,221 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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"; + } + + } +} diff --git a/data/phone-lock-view.edc b/data/phone-lock-view.edc new file mode 100755 index 0000000..2d7d331 --- /dev/null +++ b/data/phone-lock-view.edc @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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" +} + diff --git a/data/phone-lock.edc b/data/phone-lock.edc new file mode 100755 index 0000000..ff3064c --- /dev/null +++ b/data/phone-lock.edc @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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"; + } + } + } +} diff --git a/debian/changelog b/debian/changelog new file mode 100755 index 0000000..ed52d49 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,63 @@ +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 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 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 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 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 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 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 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 Wed, 07 Dec 2011 23:12:56 +0900 diff --git a/debian/compat b/debian/compat new file mode 100755 index 0000000..7ed6ff8 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/control b/debian/control new file mode 100755 index 0000000..d4147e0 --- /dev/null +++ b/debian/control @@ -0,0 +1,17 @@ +Source: phone-lock +Section: devel +Priority: extra +Maintainer: Seungtaek Chung , Mi-Ju Lee , Xi Zhichan +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 diff --git a/debian/org.tizen.phone-lock.install.in b/debian/org.tizen.phone-lock.install.in new file mode 100755 index 0000000..b30967c --- /dev/null +++ b/debian/org.tizen.phone-lock.install.in @@ -0,0 +1,8 @@ +@PREFIX@/bin/* +@PREFIX@/lib/* +@PREFIX@/data +@PREFIX@/res/locale/* +@PREFIX@/res/edje/* +@PREFIX@/res/images/* +/opt/share/applications/* +/opt/ug/* diff --git a/debian/org.tizen.phone-lock.postinst b/debian/org.tizen.phone-lock.postinst new file mode 100755 index 0000000..7f89d89 --- /dev/null +++ b/debian/org.tizen.phone-lock.postinst @@ -0,0 +1,20 @@ +#!/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 "" + diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..67969b0 --- /dev/null +++ b/debian/rules @@ -0,0 +1,119 @@ +#!/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 + diff --git a/packaging/org.tizen.phone-lock.spec b/packaging/org.tizen.phone-lock.spec new file mode 100755 index 0000000..02059b5 --- /dev/null +++ b/packaging/org.tizen.phone-lock.spec @@ -0,0 +1,61 @@ +%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 diff --git a/phone-lock-common/CMakeLists.txt b/phone-lock-common/CMakeLists.txt new file mode 100755 index 0000000..7dfb06f --- /dev/null +++ b/phone-lock-common/CMakeLists.txt @@ -0,0 +1,30 @@ +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) diff --git a/phone-lock-common/include/phone-lock-gadget.h b/phone-lock-common/include/phone-lock-gadget.h new file mode 100755 index 0000000..a294a9f --- /dev/null +++ b/phone-lock-common/include/phone-lock-gadget.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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 + +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__ */ diff --git a/phone-lock-common/include/phone-lock-string.h b/phone-lock-common/include/phone-lock-string.h new file mode 100755 index 0000000..5470be1 --- /dev/null +++ b/phone-lock-common/include/phone-lock-string.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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__ */ diff --git a/phone-lock-common/include/phone-lock-util.h b/phone-lock-common/include/phone-lock-util.h new file mode 100755 index 0000000..a02bab1 --- /dev/null +++ b/phone-lock-common/include/phone-lock-util.h @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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 +#include +#include + +#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__ */ diff --git a/phone-lock-common/include/phone-lock-verification.h b/phone-lock-common/include/phone-lock-verification.h new file mode 100755 index 0000000..ef78a0a --- /dev/null +++ b/phone-lock-common/include/phone-lock-verification.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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__ */ diff --git a/phone-lock-common/include/phone-lock-view.h b/phone-lock-common/include/phone-lock-view.h new file mode 100755 index 0000000..9094c7c --- /dev/null +++ b/phone-lock-common/include/phone-lock-view.h @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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 + +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__ */ diff --git a/phone-lock-common/src/phone-lock-gadget.c b/phone-lock-common/src/phone-lock-gadget.c new file mode 100755 index 0000000..ce08812 --- /dev/null +++ b/phone-lock-common/src/phone-lock-gadget.c @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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 +#include + +#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; +} diff --git a/phone-lock-common/src/phone-lock-string.c b/phone-lock-common/src/phone-lock-string.c new file mode 100755 index 0000000..9d3dbd8 --- /dev/null +++ b/phone-lock-common/src/phone-lock-string.c @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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 +#include + +#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; +} + diff --git a/phone-lock-common/src/phone-lock-util.c b/phone-lock-common/src/phone-lock-util.c new file mode 100755 index 0000000..9c2ffd9 --- /dev/null +++ b/phone-lock-common/src/phone-lock-util.c @@ -0,0 +1,208 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#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; +} diff --git a/phone-lock-common/src/phone-lock-verification.c b/phone-lock-common/src/phone-lock-verification.c new file mode 100755 index 0000000..4492a75 --- /dev/null +++ b/phone-lock-common/src/phone-lock-verification.c @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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 +#include +#include +#include + +#include + +#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; + } +} diff --git a/phone-lock-common/src/phone-lock-view.c b/phone-lock-common/src/phone-lock-view.c new file mode 100755 index 0000000..47f55fd --- /dev/null +++ b/phone-lock-common/src/phone-lock-view.c @@ -0,0 +1,2181 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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 +#include +#include +#include +#include +#include +#include +#include + +#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", + "", + bf1, ""); + break; + case PHONE_LOCK_VIEW_ALIGN_CENTER: + snprintf(buf, sizeof(buf), "%s%s%s", + "", + bf1, ""); + break; + case PHONE_LOCK_VIEW_ALIGN_RIGHT: + snprintf(buf, sizeof(buf), "%s%s%s", + "", + 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", + "", + hour, bf1, + "", + "", + bf2, ""); + break; + case PHONE_LOCK_VIEW_ALIGN_CENTER: + snprintf(buf, sizeof(buf), "%s%d%s%s %s%s%s", + "", + hour, bf1, + "", + "", + bf2, ""); + break; + case PHONE_LOCK_VIEW_ALIGN_RIGHT: + snprintf(buf, sizeof(buf), "%s%d%s%s %s%s%s", + "", + hour, bf1, + "", + "", + 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", + "", + bf1, ""); + break; + case PHONE_LOCK_VIEW_ALIGN_CENTER: + snprintf(buf, sizeof(buf), "%s%s%s", + "", + bf1, ""); + break; + case PHONE_LOCK_VIEW_ALIGN_RIGHT: + snprintf(buf, sizeof(buf), "%s%s%s", + "", + 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", + "", + 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", + "", + 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", + "", + 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", + "", + 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", + "", + 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", + "", + 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", + "", + "*", ""); + 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); +} diff --git a/phone-lock-main/CMakeLists.txt b/phone-lock-main/CMakeLists.txt new file mode 100755 index 0000000..669bfa4 --- /dev/null +++ b/phone-lock-main/CMakeLists.txt @@ -0,0 +1,28 @@ + +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}) + diff --git a/phone-lock-main/include/phone-lock-ui.h b/phone-lock-main/include/phone-lock-ui.h new file mode 100755 index 0000000..7131b3d --- /dev/null +++ b/phone-lock-main/include/phone-lock-ui.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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 + +int phone_lock_show_alpha_ug(struct appdata *ad); + +#endif /* __PHONE_LOCK_UI_H__ */ diff --git a/phone-lock-main/include/phone-lock.h b/phone-lock-main/include/phone-lock.h new file mode 100755 index 0000000..636e355 --- /dev/null +++ b/phone-lock-main/include/phone-lock.h @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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 +#include +#include +#include +#include + +#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__ */ diff --git a/phone-lock-main/src/phone-lock-ui.c b/phone-lock-main/src/phone-lock-ui.c new file mode 100755 index 0000000..f68a854 --- /dev/null +++ b/phone-lock-main/src/phone-lock-ui.c @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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 +#include +#include +#include +#include + +#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; +} diff --git a/phone-lock-main/src/phone-lock.c b/phone-lock-main/src/phone-lock.c new file mode 100755 index 0000000..46c2ecf --- /dev/null +++ b/phone-lock-main/src/phone-lock.c @@ -0,0 +1,407 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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 +#include +#include +#include +#include +#include + +#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); +} diff --git a/phone-lock-ug-efl/CMakeLists.txt b/phone-lock-ug-efl/CMakeLists.txt new file mode 100755 index 0000000..1f31c30 --- /dev/null +++ b/phone-lock-ug-efl/CMakeLists.txt @@ -0,0 +1,26 @@ +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) diff --git a/phone-lock-ug-efl/include/phone-lock-efl.h b/phone-lock-ug-efl/include/phone-lock-efl.h new file mode 100755 index 0000000..916c358 --- /dev/null +++ b/phone-lock-ug-efl/include/phone-lock-efl.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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 +#include +#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__ */ diff --git a/phone-lock-ug-efl/src/phone-lock-efl.c b/phone-lock-ug-efl/src/phone-lock-efl.c new file mode 100755 index 0000000..d68181d --- /dev/null +++ b/phone-lock-ug-efl/src/phone-lock-efl.c @@ -0,0 +1,468 @@ +/* + * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd All Rights Reserved + * + * This file is part of + * Written by , , + * + * 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 +#include +#include +#include +#include +#include +#include + +#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; + } +} diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt new file mode 100755 index 0000000..73fbff2 --- /dev/null +++ b/po/CMakeLists.txt @@ -0,0 +1,24 @@ +# for i18n + +SET(POFILES de_DE.po el_GR.po en.po es_ES.po fr_FR.po it_IT.po ja_JP.po ko_KR.po nl_NL.po pt_PT.po ru_RU.po tr_TR.po zh_CN.po zh_HK.po zh_TW.po) + +SET(MSGFMT "/usr/bin/msgfmt") + +FOREACH(pofile ${POFILES}) + SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile}) + MESSAGE("PO: ${pofile}") + GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE) + GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE) + SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo) + ADD_CUSTOM_COMMAND( + OUTPUT ${moFile} + COMMAND ${MSGFMT} -o ${moFile} ${absPofile} + DEPENDS ${absPofile} + ) + INSTALL(FILES ${moFile} + DESTINATION ${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}) diff --git a/po/de_DE.po b/po/de_DE.po new file mode 100755 index 0000000..4c803c4 --- /dev/null +++ b/po/de_DE.po @@ -0,0 +1,12 @@ +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" + diff --git a/po/el_GR.po b/po/el_GR.po new file mode 100755 index 0000000..6dfd124 --- /dev/null +++ b/po/el_GR.po @@ -0,0 +1,12 @@ +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 "Κλήση έκτακτης ανάγκης" + diff --git a/po/en.po b/po/en.po new file mode 100755 index 0000000..a1cce07 --- /dev/null +++ b/po/en.po @@ -0,0 +1,12 @@ +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" + diff --git a/po/es_ES.po b/po/es_ES.po new file mode 100755 index 0000000..1b49326 --- /dev/null +++ b/po/es_ES.po @@ -0,0 +1,12 @@ +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" + diff --git a/po/fr_FR.po b/po/fr_FR.po new file mode 100755 index 0000000..0b31988 --- /dev/null +++ b/po/fr_FR.po @@ -0,0 +1,12 @@ +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" + diff --git a/po/it_IT.po b/po/it_IT.po new file mode 100755 index 0000000..12c133a --- /dev/null +++ b/po/it_IT.po @@ -0,0 +1,12 @@ +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" + diff --git a/po/ja_JP.po b/po/ja_JP.po new file mode 100755 index 0000000..fbf496c --- /dev/null +++ b/po/ja_JP.po @@ -0,0 +1,12 @@ +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 "緊急通話" + diff --git a/po/ko_KR.po b/po/ko_KR.po new file mode 100755 index 0000000..eda5c38 --- /dev/null +++ b/po/ko_KR.po @@ -0,0 +1,12 @@ +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 "긴급전화" + diff --git a/po/nl_NL.po b/po/nl_NL.po new file mode 100755 index 0000000..21d2b4e --- /dev/null +++ b/po/nl_NL.po @@ -0,0 +1,12 @@ +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" + diff --git a/po/pt_PT.po b/po/pt_PT.po new file mode 100755 index 0000000..ed1b179 --- /dev/null +++ b/po/pt_PT.po @@ -0,0 +1,12 @@ +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" + diff --git a/po/ru_RU.po b/po/ru_RU.po new file mode 100755 index 0000000..623ba02 --- /dev/null +++ b/po/ru_RU.po @@ -0,0 +1,12 @@ +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 "Экстренный вызов" + diff --git a/po/tr_TR.po b/po/tr_TR.po new file mode 100755 index 0000000..e586ed5 --- /dev/null +++ b/po/tr_TR.po @@ -0,0 +1,12 @@ +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" + diff --git a/po/zh_CN.po b/po/zh_CN.po new file mode 100755 index 0000000..e1c3423 --- /dev/null +++ b/po/zh_CN.po @@ -0,0 +1,12 @@ +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 "紧急呼叫" + diff --git a/po/zh_HK.po b/po/zh_HK.po new file mode 100755 index 0000000..c8f6627 --- /dev/null +++ b/po/zh_HK.po @@ -0,0 +1,12 @@ +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 "緊急通話" + diff --git a/po/zh_TW.po b/po/zh_TW.po new file mode 100755 index 0000000..a5a6882 --- /dev/null +++ b/po/zh_TW.po @@ -0,0 +1,12 @@ +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 "緊急電話" + diff --git a/sb-conf b/sb-conf new file mode 100755 index 0000000..e69de29 -- 2.7.4