From: JongTae Date: Fri, 8 Nov 2013 04:58:53 +0000 (+0900) Subject: Applied latest source code X-Git-Tag: accepted/tizen/20131108.070404^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4fd1f19cc60e3cbe1abba9522dfc060fba82a6a6;p=apps%2Fnative%2Fpreloaded%2FLock.git Applied latest source code Change-Id: I6ac67373fdb43358cf3926577075cee5fefbeb66 --- diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..6e0c82f --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,32 @@ +# Target name and PKGID +## TODO : set application name and ID +SET(this_target Lock) +SET(PKGID sgooa9p9fz) + +# include directory +INCLUDE_DIRECTORIES( + /usr/include/osp + inc/ + ) + +# Source files +FILE(GLOB ${this_target}_SOURCE_FILES src/*.cpp) + +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE") + +# Create executable +SET(CMAKE_EXECUTABLE_SUFFIX ".exe") +ADD_EXECUTABLE (${this_target} ${${this_target}_SOURCE_FILES}) + +# Set link libraries and link options +## TODO : add more link libraries and options +TARGET_LINK_LIBRARIES(${this_target} -L/usr/lib/osp osp-appfw osp-uifw osp-media osp-telephony osp-image pthread) +TARGET_LINK_LIBRARIES(${this_target} -Xlinker --allow-shlib-undefined -pthread -pie) + +# Copy info, data, res, and icons directories +INSTALL(TARGETS ${this_target} DESTINATION ../usr/apps/${PKGID}/bin) + +# Copy resource +INSTALL(FILES ${CMAKE_SOURCE_DIR}/manifest.xml DESTINATION ../usr/apps/${PKGID}/info) +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res DESTINATION ../usr/apps/${PKGID}) +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/shared DESTINATION ../usr/apps/${PKGID}) diff --git a/LICENSE.Flora b/LICENSE.Flora new file mode 100755 index 0000000..571fe79 --- /dev/null +++ b/LICENSE.Flora @@ -0,0 +1,206 @@ +Flora License + +Version 1.1, April, 2013 + +http://floralicense.org/license/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, +and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by +the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and +all other entities that control, are controlled by, or are +under common control with that entity. For the purposes of +this definition, "control" means (i) the power, direct or indirect, +to cause the direction or management of such entity, +whether by contract or otherwise, or (ii) ownership of fifty percent (50%) +or more of the outstanding shares, or (iii) beneficial ownership of +such entity. + +"You" (or "Your") shall mean an individual or Legal Entity +exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation source, +and configuration files. + +"Object" form shall mean any form resulting from mechanical +transformation or translation of a Source form, including but +not limited to compiled object code, generated documentation, +and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, +made available under the License, as indicated by a copyright notice +that is included in or attached to the work (an example is provided +in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, +that is based on (or derived from) the Work and for which the editorial +revisions, annotations, elaborations, or other modifications represent, +as a whole, an original work of authorship. For the purposes of this License, +Derivative Works shall not include works that remain separable from, +or merely link (or bind by name) to the interfaces of, the Work and +Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original +version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor +for inclusion in the Work by the copyright owner or by an individual or +Legal Entity authorized to submit on behalf of the copyright owner. +For the purposes of this definition, "submitted" means any form of +electronic, verbal, or written communication sent to the Licensor or +its representatives, including but not limited to communication on +electronic mailing lists, source code control systems, and issue +tracking systems that are managed by, or on behalf of, the Licensor +for the purpose of discussing and improving the Work, but excluding +communication that is conspicuously marked or otherwise designated +in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity +on behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work. + +"Tizen Certified Platform" shall mean a software platform that complies +with the standards set forth in the Tizen Compliance Specification +and passes the Tizen Compliance Tests as defined from time to time +by the Tizen Technical Steering Group and certified by the Tizen +Association or its designated agent. + +2. Grant of Copyright License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the +Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +(except as stated in this section) patent license to make, have made, +use, offer to sell, sell, import, and otherwise transfer the Work +solely as incorporated into a Tizen Certified Platform, where such +license applies only to those patent claims licensable by such +Contributor that are necessarily infringed by their Contribution(s) +alone or by combination of their Contribution(s) with the Work solely +as incorporated into a Tizen Certified Platform to which such +Contribution(s) was submitted. If You institute patent litigation +against any entity (including a cross-claim or counterclaim +in a lawsuit) alleging that the Work or a Contribution incorporated +within the Work constitutes direct or contributory patent infringement, +then any patent licenses granted to You under this License for that +Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the +Work or Derivative Works thereof pursuant to the copyright license +above, in any medium, with or without modifications, and in Source or +Object form, provided that You meet the following conditions: + + 1. You must give any other recipients of the Work or Derivative Works + a copy of this License; and + 2. You must cause any modified files to carry prominent notices stating + that You changed the files; and + 3. You must retain, in the Source form of any Derivative Works that + You distribute, all copyright, patent, trademark, and attribution + notices from the Source form of the Work, excluding those notices + that do not pertain to any part of the Derivative Works; and + 4. If the Work includes a "NOTICE" text file as part of its distribution, + then any Derivative Works that You distribute must include a readable + copy of the attribution notices contained within such NOTICE file, + excluding those notices that do not pertain to any part of + the Derivative Works, in at least one of the following places: + within a NOTICE text file distributed as part of the Derivative Works; + within the Source form or documentation, if provided along with the + Derivative Works; or, within a display generated by the Derivative Works, + if and wherever such third-party notices normally appear. + The contents of the NOTICE file are for informational purposes only + and do not modify the License. You may add Your own attribution notices + within Derivative Works that You distribute, alongside or as an addendum + to the NOTICE text from the Work, provided that such additional attribution + notices cannot be construed as modifying the License. You may add Your own + copyright statement to Your modifications and may provide additional or + different license terms and conditions for use, reproduction, or + distribution of Your modifications, or for any such Derivative Works + as a whole, provided Your use, reproduction, and distribution of + the Work otherwise complies with the conditions stated in this License + and your own copyright statement or terms and conditions do not conflict + the conditions stated in the License including section 3. + +5. Submission of Contributions. Unless You explicitly state otherwise, +any Contribution intentionally submitted for inclusion in the Work +by You to the Licensor shall be under the terms and conditions of +this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify +the terms of any separate license agreement you may have executed +with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade +names, trademarks, service marks, or product names of the Licensor, +except as required for reasonable and customary use in describing the +origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or +agreed to in writing, Licensor provides the Work (and each +Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied, including, without limitation, any warranties or conditions +of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +PARTICULAR PURPOSE. You are solely responsible for determining the +appropriateness of using or redistributing the Work and assume any +risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, +whether in tort (including negligence), contract, or otherwise, +unless required by applicable law (such as deliberate and grossly +negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, +incidental, or consequential damages of any character arising as a +result of this License or out of the use or inability to use the +Work (including but not limited to damages for loss of goodwill, +work stoppage, computer failure or malfunction, or any and all +other commercial damages or losses), even if such Contributor +has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing +the Work or Derivative Works thereof, You may choose to offer, +and charge a fee for, acceptance of support, warranty, indemnity, +or other liability obligations and/or rights consistent with this +License. However, in accepting such obligations, You may act only +on Your own behalf and on Your sole responsibility, not on behalf +of any other Contributor, and only if You agree to indemnify, +defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason +of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Flora License to your work + +To apply the Flora License to your work, attach the following +boilerplate notice, with the fields enclosed by brackets "[]" +replaced with your own identifying information. (Don't include +the brackets!) The text should be enclosed in the appropriate +comment syntax for the file format. We also recommend that a +file or class name and description of purpose be included on the +same "printed page" as the copyright notice for easier +identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Flora License, Version 1.1 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://floralicense.org/license/ + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/NOTICE b/NOTICE new file mode 100755 index 0000000..a5964ea --- /dev/null +++ b/NOTICE @@ -0,0 +1,3 @@ +Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved. +Except as noted, this software is licensed under Flora License, Version 1.1. +Please, see the LICENSE.Flora file for Flora License, Version 1.1 terms and conditions. diff --git a/inc/LcLockApp.h b/inc/LcLockApp.h new file mode 100644 index 0000000..a4fedf3 --- /dev/null +++ b/inc/LcLockApp.h @@ -0,0 +1,57 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.1 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file LcLockApp.h + * @brief Keeps declaration of UiApp derived class. + */ + +#ifndef _LC_LOCK_APP_H_ +#define _LC_LOCK_APP_H_ + +#include +#include + +/** + * UiApp must inherit from UiApp class + * which provides basic features necessary to define an UiApp. + */ +class LockApp + : public Tizen::App::UiApp + , public Tizen::System::IScreenEventListener +{ +public: + static Tizen::App::UiApp* CreateInstance(void); + +public: + LockApp(void); + virtual ~LockApp(void); + +public: + virtual bool OnAppInitialized(void); + virtual bool OnAppInitializing(Tizen::App::AppRegistry& appRegistry); + virtual bool OnAppTerminating(Tizen::App::AppRegistry& appRegistry, bool forcedTermination = false); + virtual bool OnAppWillTerminate(void); + virtual void OnBackground(void); + virtual void OnBatteryLevelChanged(Tizen::System::BatteryLevel batteryLevel); + virtual void OnForeground(void); + virtual void OnLowMemory(void); + + virtual void OnScreenOff(void); + virtual void OnScreenOn(void); +}; + +#endif //_LC_LOCK_APP_H_ diff --git a/inc/LcLockForm.h b/inc/LcLockForm.h new file mode 100644 index 0000000..f6582df --- /dev/null +++ b/inc/LcLockForm.h @@ -0,0 +1,127 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.1 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file LcLockForm.h + * @brief Keeps declaration of LockForm which, + * Displays a locked Screen with a Current date time and text to help unlock. + */ + +#ifndef _LC_LOCK_FORM_H_ +#define _LC_LOCK_FORM_H_ + +#include +#include +#include + +class LockForm + : public Tizen::Ui::Controls::Form + , public Tizen::Base::Runtime::ITimerEventListener + , public Tizen::Ui::ITouchEventListener + , public Tizen::System::ISettingEventListener +{ +public: + /** + * This is the constructor for the class + */ + LockForm(void); + + /** + * This is the destructor for the class + */ + virtual ~LockForm(void); + + /** + * Creates a Bitmap object using the image file passed in the argument. + */ + static Tizen::Graphics::Bitmap* GetBitmapN(const Tizen::Base::String& imagePath); + + /** + * Initializes this form in the application + */ + bool Initialize(void); + + /** + * Called to stop drawing process when app goes in background/Screen gets off + */ + void StopDrawingUpdates(void); + + /** + * Called to stop drawing process when app goes in foreground/Screen gets on again + */ + void StartDrawingUpdates(void); + +public: + //Callback methods from Form + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + //from interface ITimerEventListener + virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer); + + //callback methods from ITouchEventListener + virtual void OnTouchCanceled(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {} + virtual void OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {} + virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {} + virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo); + virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo); + virtual void OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo); + + // from ISettingEventListener + virtual void OnSettingChanged(Tizen::Base::String& key); + +private: + /** + * GetDateTime is a private member function taking no arguments and returning no values + * Called during OnInitializing() once and OnTimerExpired(), It gets the current System Date and time. + */ + void GetDateTime(Tizen::Base::String& date, Tizen::Base::String& time, Tizen::Base::String& amPm); + + /** + * Initializes controls, which are required to be initialized after showing the screen once. + */ + void InitializeControls(void); + + /** + * Updates Date and time labels with the current time + */ + void UpdateDateTimeLabels(void); + +private: + bool __opacityInverted; + bool __unlockState; + Tizen::Base::Collection::ArrayListT* __pLockImageList; + Tizen::Base::Collection::ArrayList* __pSwipeLabelList; + Tizen::Base::Runtime::Timer* __pDateTimeTimer; + Tizen::Graphics::Bitmap* __pInnerCircleBitmap; + Tizen::Ui::Animations::VisualElement* __pLockIconVisualElement; + Tizen::Ui::Animations::VisualElement* __pLockInnerCircleVisualElement; + Tizen::Ui::Animations::VisualElement* __pLockOuterCircleVisualElement; + Tizen::Ui::Animations::VisualElement* __pUnlockIconVisualElement; + Tizen::Ui::Animations::VisualElement* __pUnlockInnerCircleVisualElement; + Tizen::Ui::Controls::Label* __pAmPmLabel; + Tizen::Ui::Controls::Label* __pBackgroundLabel; + Tizen::Ui::Controls::Label* __pDateLabel; + Tizen::Ui::Controls::Label* __pLockIconLabel; + Tizen::Ui::Controls::Label* __pOperatorLabel; + Tizen::Ui::Controls::Label* __pTimeLabel; + Tizen::Ui::Controls::Label* __pUnlockIconLabel; + Tizen::Ui::Controls::Panel* __pLockPanel; + Tizen::Ui::Controls::Panel* __pMainPanel; + Tizen::Ui::Controls::Panel* __pUnlockPanel; +}; + +#endif //_LC_LOCK_FORM_H_ diff --git a/inc/LcMainFrame.h b/inc/LcMainFrame.h new file mode 100644 index 0000000..6dd58a1 --- /dev/null +++ b/inc/LcMainFrame.h @@ -0,0 +1,39 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.1 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file LcMainFrame.h + * @brief Keeps the declaration of MainFrame for the application. + */ + +#ifndef _LC_MAIN_FRAME_H_ +#define _LC_MAIN_FRAME_H_ + +#include + +class MainFrame + : public Tizen::Ui::Controls::Frame +{ +public: + MainFrame(void); + virtual ~MainFrame(void); + +public: + virtual result OnInitializing(void); + virtual result OnTerminating(void); +}; + +#endif //_LC_MAIN_FRAME_H_ diff --git a/inc/LcTypes.h b/inc/LcTypes.h new file mode 100644 index 0000000..e8b8a4f --- /dev/null +++ b/inc/LcTypes.h @@ -0,0 +1,106 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.1 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +/** + * @file LcTypes.h + * @brief Declares the constants and the Ids used in the project + */ + +#ifndef _LC_TYPES_H_ +#define _LC_TYPES_H_ + +extern const int COUNT_SWIPE_LABEL; +extern const int COUNT_LOCK_IMAGES; +extern const int DATE_TIME_TIMER_DURATION; +extern const int DIVISION_FACTOR_FOR_COUNT; +extern const int DURATION_FOR_LAZY_INIT; +extern const int FONT_SIZE_AM_PM_LABEL; +extern const int FONT_SIZE_DATE_LABEL; +extern const int FONT_SIZE_HELP_TEXT; +extern const int FONT_SIZE_TIME_LABEL; +extern const int H_AM_PM_LABEL; +extern const int H_DATE_LABEL; +extern const int H_HELP_TEXT_LABEL; +extern const int H_INNER_CIRCLE_PANEL; +extern const int H_LOCK_OUTER_CIRCLE; +extern const int H_MAIN_PANEL; +extern const int H_UNLOCK_PANEL; +extern const int H_OPERATOR_LABEL; +extern const int H_SWIPE_LABEL; +extern const int H_TIME_LABEL; +extern const int W_AM_PM_LABEL; +extern const int W_DATE_LABEL; +extern const int W_HELP_TEXT_LABEL; +extern const int W_INNER_CIRCLE_PANEL; +extern const int W_LOCK_OUTER_CIRCLE; +extern const int W_OPERATOR_LABEL; +extern const int W_SWIPE_LABEL; +extern const int W_TIME_LABEL; +extern const int W_UNLOCK_PANEL; +extern const int X_AM_PM_LABEL; +extern const int X_DATE_LABEL; +extern const int X_HELP_TEXT_LABEL; +extern const int X_INNER_CIRCLE_PANEL; +extern const int X_LOCK; +extern const int X_LOCK_ICON; +extern const int X_MAIN_PANEL; +extern const int X_MIN_DELTA_LABELS; +extern const int X_MIN_DISTANCE; +extern const int X_MIN_OFFSET; +extern const int X_OPERATOR_LABEL; +extern const int X_TIME_LABEL; +extern const int X_TOUCH_PRESSED_VALID; +extern const int X_UNLOCK_CIRCLE; +extern const int X_UNLOCK_PANEL; + +extern const int Y_DATE_LABEL_OFFSET; +extern const int Y_AM_PM_LABEL_OFFSET; +extern const int Y_HELP_TEXT_LABEL_OFFSET; +extern const int Y_INNER_CIRCLE_PANEL; +extern const int Y_LOCK; +extern const int Y_LOCK_ICON; +extern const int Y_LOCK_OUTER_VISUAL_ELEMENT; +extern const int Y_MAIN_PANEL_OFFSET; +extern const int Y_OPERATOR_LABEL; +extern const int Y_SWIPE_LABEL; +extern const int Y_TIME_LABEL_OFFSET; +extern const int Y_TOUCH_PRESSED_VALID; +extern const int Y_UNLOCK_CIRCLE; +extern const int Y_UNLOCK_PANEL; +extern const unsigned int COLOR_LABEL_TEXT; +extern const unsigned int COLOR_VISUAL_ELEMENT; +extern const unsigned int COLOR_HELP_TEXT_BG; +extern const unsigned int COLOR_HELP_TEXT_SHADOW; +extern const wchar_t* AMPM_PATTERN; +extern const wchar_t* DATE_PATTERN; +extern const wchar_t* IDB_BACKGROUND; +extern const wchar_t* IDB_UNLOCK_CIRCLE01; +extern const wchar_t* IDB_UNLOCK_CIRCLE02; +extern const wchar_t* IDB_UNLOCK_CIRCLE03; +extern const wchar_t* LOCK_WALLPAPER_KEY; +extern const wchar_t* TIME_PATTERN; +extern const wchar_t* TIME_PATTERN_24HR; +extern const wchar_t* UNLOCK_PRESS_BASE; +extern const wchar_t* UNLOCK_PRESS_EXTENSION; +extern const wchar_t* SETTINGS_TIME_FORMAT_IS24_KEY; +extern const wchar_t* SETTINGS_TIME_FORMAT_KEY; +extern const wchar_t* LOCK_INNER_CIRCLE_VISUAL_ELEMENT; +extern const wchar_t* LOCK_OUTER_CIRCLE_VISUAL_ELEMENT; +extern const wchar_t* UNLOCK_INNER_CIRCLE_VISUAL_ELEMENT; +extern const wchar_t* LOCK_ICON_VISUAL_ELEMENT; +extern const wchar_t* UNLOCK_ICON_VISUAL_ELEMENT; +extern const wchar_t* SWIPE_VISUAL_ELEMENT_NAME_BASE; + +#endif //_LC_TYPES_H_ diff --git a/manifest.xml b/manifest.xml new file mode 100644 index 0000000..6a18b39 --- /dev/null +++ b/manifest.xml @@ -0,0 +1,28 @@ + + + sgooa9p9fz + 1.0.0 + C++App + + true + true + + + 2.1 + + http://tizen.org/privilege/uimanager + http://tizen.org/privilege/telephony + + + + + + Lock-Ref + + + mainmenu.png + + + + + diff --git a/packaging/apps.Lock.spec b/packaging/apps.Lock.spec new file mode 100755 index 0000000..af97d2d --- /dev/null +++ b/packaging/apps.Lock.spec @@ -0,0 +1,75 @@ +Name: apps.Lock +Summary: Lock application +Version: 1.0.0 +Release: 1 +Group: TO_BE/FILLED_IN +License: TO BE FILLED IN +Source0: %{name}-%{version}.tar.gz +BuildRequires: cmake +BuildRequires: pkgconfig(osp-appfw) +BuildRequires: pkgconfig(osp-uifw) +BuildRequires: osp-appfw-internal-devel +BuildRequires: osp-uifw-internal-devel +BuildRequires: pkgconfig(osp-uifw) +BuildRequires: osp-uifw-internal-devel +BuildRequires: pkgconfig(osp-media) +BuildRequires: osp-media-internal-devel +BuildRequires: pkgconfig(osp-image) +BuildRequires: osp-image-internal-devel +BuildRequires: pkgconfig(osp-image-core) +BuildRequires: pkgconfig(osp-net) +BuildRequires: osp-net-internal-devel +BuildRequires: pkgconfig(osp-telephony) +BuildRequires: hash-signer + +Requires: osp-installer + +%description +Verification application: Lock + +%prep +%setup -q + +%build +MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` +%ifarch %{ix86} +%if 0%{?simulator} +CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} +%else +CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ " cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} +%endif +%else +CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} +%endif + +# Call make instruction with smp support +make %{?jobs:-j%jobs} + +%install +rm -rf %{buildroot} +%make_install +###### for package signing step ###### +PKG_ID=sgooa9p9fz +%define tizen_sign 1 +%define tizen_sign_base /usr/apps/${PKG_ID} +%define tizen_sign_level platform +%define tizen_author_sign 1 +%define tizen_dist_sign 1 + +%post +/sbin/ldconfig +PKG_ID=sgooa9p9fz +echo "/usr/etc/package-manager/backend/tpk -i /usr/apps/"${PKG_ID} +/usr/etc/package-manager/backend/tpk -i /usr/apps/${PKG_ID} +cp -f /usr/lib/osp/osp-ui-app-loader /usr/apps/${PKG_ID}/bin/Lock +vconftool set -t string file/private/lockscreen/pkgname "sgooa9p9fz.Lock" -u 5000 -g 5000 -f + +%postun +/sbin/ldconfig +PKG_ID=sgooa9p9fz +echo "/usr/etc/package-manager/backend/tpk -u "${PKG_ID} +/usr/etc/package-manager/backend/tpk -u ${PKG_ID} + +%files +%defattr(-,root,root,-) +/usr/apps/* diff --git a/res/ara-AE.xml b/res/ara-AE.xml new file mode 100644 index 0000000..ec16944 --- /dev/null +++ b/res/ara-AE.xml @@ -0,0 +1,7 @@ + + + لا توجد SIM + اسحب على الشاشة لإلغاء القفل + diff --git a/res/aze-AZ.xml b/res/aze-AZ.xml new file mode 100644 index 0000000..9ea72f7 --- /dev/null +++ b/res/aze-AZ.xml @@ -0,0 +1,7 @@ + + + SIM yoxdur + Kilidi açmaq üçün ekranda sürüşdürün + diff --git a/res/bul-BG.xml b/res/bul-BG.xml new file mode 100644 index 0000000..3a65a19 --- /dev/null +++ b/res/bul-BG.xml @@ -0,0 +1,7 @@ + + + Няма SIM + Завъртете екрана, за да отключите + diff --git a/res/cat-ES.xml b/res/cat-ES.xml new file mode 100644 index 0000000..ee9d0be --- /dev/null +++ b/res/cat-ES.xml @@ -0,0 +1,7 @@ + + + Sense SIM + Desplaci el dit per la pantalla per desbloquejar-la + diff --git a/res/ces-CZ.xml b/res/ces-CZ.xml new file mode 100644 index 0000000..3742df0 --- /dev/null +++ b/res/ces-CZ.xml @@ -0,0 +1,7 @@ + + + Žádná SIM karta + Pro odemknutí přejeďte po displeji + diff --git a/res/dan-DK.xml b/res/dan-DK.xml new file mode 100644 index 0000000..d1e9a47 --- /dev/null +++ b/res/dan-DK.xml @@ -0,0 +1,7 @@ + + + Intet SIM-kort + Stryg på skærm for at låse op + diff --git a/res/deu-DE.xml b/res/deu-DE.xml new file mode 100644 index 0000000..c79278a --- /dev/null +++ b/res/deu-DE.xml @@ -0,0 +1,7 @@ + + + Keine SIM + Zum Entsperren über Bildschirm streichen + diff --git a/res/ell-GR.xml b/res/ell-GR.xml new file mode 100644 index 0000000..f899aba --- /dev/null +++ b/res/ell-GR.xml @@ -0,0 +1,7 @@ + + + Δεν βρέθηκε SIM + Σύρετε το δάχτυλό σας στην οθόνη για ξεκλείδωμα + diff --git a/res/eng-GB.xml b/res/eng-GB.xml new file mode 100644 index 0000000..21cf9a2 --- /dev/null +++ b/res/eng-GB.xml @@ -0,0 +1,7 @@ + + + No SIM + Swipe screen to unlock + diff --git a/res/eng-PH.xml b/res/eng-PH.xml new file mode 100644 index 0000000..1f000b0 --- /dev/null +++ b/res/eng-PH.xml @@ -0,0 +1,7 @@ + + + No SIM + Sweep screen to unlock + diff --git a/res/eng-US.xml b/res/eng-US.xml new file mode 100644 index 0000000..1f000b0 --- /dev/null +++ b/res/eng-US.xml @@ -0,0 +1,7 @@ + + + No SIM + Sweep screen to unlock + diff --git a/res/est-EE.xml b/res/est-EE.xml new file mode 100644 index 0000000..e72ba58 --- /dev/null +++ b/res/est-EE.xml @@ -0,0 +1,7 @@ + + + SIM-i pole + Avamiseks libistage sõrme üle ekraani + diff --git a/res/eus-ES.xml b/res/eus-ES.xml new file mode 100644 index 0000000..fba70b4 --- /dev/null +++ b/res/eus-ES.xml @@ -0,0 +1,7 @@ + + + Ez dago SIM txartelik + Arrastatu pantaila desblokeatzeko + diff --git a/res/fin-FI.xml b/res/fin-FI.xml new file mode 100644 index 0000000..8677c2a --- /dev/null +++ b/res/fin-FI.xml @@ -0,0 +1,7 @@ + + + Ei SIM-korttia + Avaa pyyhkäisemällä näyttöä + diff --git a/res/fra-CA.xml b/res/fra-CA.xml new file mode 100644 index 0000000..de2cf1c --- /dev/null +++ b/res/fra-CA.xml @@ -0,0 +1,7 @@ + + + Pas de carte SIM + Glissez un doigt sur l'écran pour déverrouiller + diff --git a/res/fra-FR.xml b/res/fra-FR.xml new file mode 100644 index 0000000..f6f96e9 --- /dev/null +++ b/res/fra-FR.xml @@ -0,0 +1,7 @@ + + + Pas de carte SIM + Faites glisser votre doigt sur l'écran pour déverrouiller + diff --git a/res/gle-IE.xml b/res/gle-IE.xml new file mode 100644 index 0000000..70a4fc8 --- /dev/null +++ b/res/gle-IE.xml @@ -0,0 +1,7 @@ + + + Níl SIM ann + Svaidhpeáil an scáileán lena díghlasáil + diff --git a/res/glg-ES.xml b/res/glg-ES.xml new file mode 100644 index 0000000..26f69ac --- /dev/null +++ b/res/glg-ES.xml @@ -0,0 +1,7 @@ + + + Non hai SIM + Move a pantalla para desbloquealo + diff --git a/res/hin-IN.xml b/res/hin-IN.xml new file mode 100644 index 0000000..4230af4 --- /dev/null +++ b/res/hin-IN.xml @@ -0,0 +1,7 @@ + + + कोई SIM नहीं + अनलॉक करने के लिए स्क्रीन स्विप करें + diff --git a/res/hrv-HR.xml b/res/hrv-HR.xml new file mode 100644 index 0000000..e73b8e8 --- /dev/null +++ b/res/hrv-HR.xml @@ -0,0 +1,7 @@ + + + Nema SIM-a + Kliznite po zaslonu za otključavanje + diff --git a/res/hun-HU.xml b/res/hun-HU.xml new file mode 100644 index 0000000..c543717 --- /dev/null +++ b/res/hun-HU.xml @@ -0,0 +1,7 @@ + + + Nincs SIM + A feloldáshoz húzza végig az ujját a kijelzőn + diff --git a/res/hye-AM.xml b/res/hye-AM.xml new file mode 100644 index 0000000..cf6d544 --- /dev/null +++ b/res/hye-AM.xml @@ -0,0 +1,7 @@ + + + SIM չկա + Մաքրել էկրանը՝ արգելաբացելու համար + diff --git a/res/isl-IS.xml b/res/isl-IS.xml new file mode 100644 index 0000000..c6be378 --- /dev/null +++ b/res/isl-IS.xml @@ -0,0 +1,7 @@ + + + Ekkert SIM-kort + Renndu fingrinum yfir skjáinn til að opna + diff --git a/res/ita-IT.xml b/res/ita-IT.xml new file mode 100644 index 0000000..92bfdca --- /dev/null +++ b/res/ita-IT.xml @@ -0,0 +1,7 @@ + + + Nessuna SIM + Trascina il dito sul display per sbloccare + diff --git a/res/jpn-JP.xml b/res/jpn-JP.xml new file mode 100644 index 0000000..da86c67 --- /dev/null +++ b/res/jpn-JP.xml @@ -0,0 +1,7 @@ + + + SIM未挿入 + 画面をスイープして、ロックを解除 + diff --git a/res/kat-GE.xml b/res/kat-GE.xml new file mode 100644 index 0000000..8124964 --- /dev/null +++ b/res/kat-GE.xml @@ -0,0 +1,7 @@ + + + SIM არაა + გადაუსვით ეკრანზე და განიბლოკება + diff --git a/res/kaz-KZ.xml b/res/kaz-KZ.xml new file mode 100644 index 0000000..c6725d4 --- /dev/null +++ b/res/kaz-KZ.xml @@ -0,0 +1,7 @@ + + + SIM жоқ + Құлпын ашу үшін экранды сүртіңіз + diff --git a/res/kor-KR.xml b/res/kor-KR.xml new file mode 100644 index 0000000..fb35729 --- /dev/null +++ b/res/kor-KR.xml @@ -0,0 +1,7 @@ + + + SIM이 없습니다 + 해제하려면 화면을 움직이세요 + diff --git a/res/lav-LV.xml b/res/lav-LV.xml new file mode 100644 index 0000000..79edf6b --- /dev/null +++ b/res/lav-LV.xml @@ -0,0 +1,7 @@ + + + Nav SIM + Slidiniet, lai atbloķētu + diff --git a/res/lit-LT.xml b/res/lit-LT.xml new file mode 100644 index 0000000..e01de19 --- /dev/null +++ b/res/lit-LT.xml @@ -0,0 +1,7 @@ + + + Nėra SIM + Perbraukite per ekraną ir atrakinkite + diff --git a/res/mkd-MK.xml b/res/mkd-MK.xml new file mode 100644 index 0000000..16ae5fd --- /dev/null +++ b/res/mkd-MK.xml @@ -0,0 +1,7 @@ + + + Нема SIM + Поминете по екранот за отклучување + diff --git a/res/nld-NL.xml b/res/nld-NL.xml new file mode 100644 index 0000000..9aaf1ee --- /dev/null +++ b/res/nld-NL.xml @@ -0,0 +1,7 @@ + + + Geen SIM + Veeg over scherm om te ontgrendelen + diff --git a/res/nob-NO.xml b/res/nob-NO.xml new file mode 100644 index 0000000..c2917db --- /dev/null +++ b/res/nob-NO.xml @@ -0,0 +1,7 @@ + + + Mangler SIM-kort + Stryk på skjermen for å låse opp + diff --git a/res/pol-PL.xml b/res/pol-PL.xml new file mode 100644 index 0000000..6921cac --- /dev/null +++ b/res/pol-PL.xml @@ -0,0 +1,7 @@ + + + Brak karty SIM + Przesuń palcem po ekranie, aby odblokować + diff --git a/res/por-BR.xml b/res/por-BR.xml new file mode 100644 index 0000000..025e092 --- /dev/null +++ b/res/por-BR.xml @@ -0,0 +1,7 @@ + + + Sem Cartão SIM + Deslize a tela para desbloquear + diff --git a/res/por-PT.xml b/res/por-PT.xml new file mode 100644 index 0000000..49168ad --- /dev/null +++ b/res/por-PT.xml @@ -0,0 +1,7 @@ + + + Sem SIM + Passar dedo no ecrã para desbloquear + diff --git a/res/ron-RO.xml b/res/ron-RO.xml new file mode 100644 index 0000000..c072521 --- /dev/null +++ b/res/ron-RO.xml @@ -0,0 +1,7 @@ + + + Fără SIM + Glisaţi pe ecran pentru a debloca + diff --git a/res/rus-RU.xml b/res/rus-RU.xml new file mode 100644 index 0000000..dbc2413 --- /dev/null +++ b/res/rus-RU.xml @@ -0,0 +1,7 @@ + + + Нет SIM-карты + Проведите по экрану + diff --git a/res/screen-density-xhigh/B07_icon_Unlock_1.png b/res/screen-density-xhigh/B07_icon_Unlock_1.png new file mode 100644 index 0000000..86c533b Binary files /dev/null and b/res/screen-density-xhigh/B07_icon_Unlock_1.png differ diff --git a/res/screen-density-xhigh/B07_icon_Unlock_10.png b/res/screen-density-xhigh/B07_icon_Unlock_10.png new file mode 100644 index 0000000..3543b4b Binary files /dev/null and b/res/screen-density-xhigh/B07_icon_Unlock_10.png differ diff --git a/res/screen-density-xhigh/B07_icon_Unlock_11.png b/res/screen-density-xhigh/B07_icon_Unlock_11.png new file mode 100644 index 0000000..eb25efb Binary files /dev/null and b/res/screen-density-xhigh/B07_icon_Unlock_11.png differ diff --git a/res/screen-density-xhigh/B07_icon_Unlock_12.png b/res/screen-density-xhigh/B07_icon_Unlock_12.png new file mode 100644 index 0000000..d46aba0 Binary files /dev/null and b/res/screen-density-xhigh/B07_icon_Unlock_12.png differ diff --git a/res/screen-density-xhigh/B07_icon_Unlock_13.png b/res/screen-density-xhigh/B07_icon_Unlock_13.png new file mode 100644 index 0000000..4286ea8 Binary files /dev/null and b/res/screen-density-xhigh/B07_icon_Unlock_13.png differ diff --git a/res/screen-density-xhigh/B07_icon_Unlock_14.png b/res/screen-density-xhigh/B07_icon_Unlock_14.png new file mode 100644 index 0000000..2db62c6 Binary files /dev/null and b/res/screen-density-xhigh/B07_icon_Unlock_14.png differ diff --git a/res/screen-density-xhigh/B07_icon_Unlock_15.png b/res/screen-density-xhigh/B07_icon_Unlock_15.png new file mode 100644 index 0000000..6238664 Binary files /dev/null and b/res/screen-density-xhigh/B07_icon_Unlock_15.png differ diff --git a/res/screen-density-xhigh/B07_icon_Unlock_2.png b/res/screen-density-xhigh/B07_icon_Unlock_2.png new file mode 100644 index 0000000..8a319b9 Binary files /dev/null and b/res/screen-density-xhigh/B07_icon_Unlock_2.png differ diff --git a/res/screen-density-xhigh/B07_icon_Unlock_3.png b/res/screen-density-xhigh/B07_icon_Unlock_3.png new file mode 100644 index 0000000..4823c86 Binary files /dev/null and b/res/screen-density-xhigh/B07_icon_Unlock_3.png differ diff --git a/res/screen-density-xhigh/B07_icon_Unlock_4.png b/res/screen-density-xhigh/B07_icon_Unlock_4.png new file mode 100644 index 0000000..0ea9cdb Binary files /dev/null and b/res/screen-density-xhigh/B07_icon_Unlock_4.png differ diff --git a/res/screen-density-xhigh/B07_icon_Unlock_5.png b/res/screen-density-xhigh/B07_icon_Unlock_5.png new file mode 100644 index 0000000..b374912 Binary files /dev/null and b/res/screen-density-xhigh/B07_icon_Unlock_5.png differ diff --git a/res/screen-density-xhigh/B07_icon_Unlock_6.png b/res/screen-density-xhigh/B07_icon_Unlock_6.png new file mode 100644 index 0000000..8166be0 Binary files /dev/null and b/res/screen-density-xhigh/B07_icon_Unlock_6.png differ diff --git a/res/screen-density-xhigh/B07_icon_Unlock_7.png b/res/screen-density-xhigh/B07_icon_Unlock_7.png new file mode 100644 index 0000000..a356621 Binary files /dev/null and b/res/screen-density-xhigh/B07_icon_Unlock_7.png differ diff --git a/res/screen-density-xhigh/B07_icon_Unlock_8.png b/res/screen-density-xhigh/B07_icon_Unlock_8.png new file mode 100644 index 0000000..293ea19 Binary files /dev/null and b/res/screen-density-xhigh/B07_icon_Unlock_8.png differ diff --git a/res/screen-density-xhigh/B07_icon_Unlock_9.png b/res/screen-density-xhigh/B07_icon_Unlock_9.png new file mode 100644 index 0000000..b978e75 Binary files /dev/null and b/res/screen-density-xhigh/B07_icon_Unlock_9.png differ diff --git a/res/screen-density-xhigh/BG.png b/res/screen-density-xhigh/BG.png new file mode 100644 index 0000000..12a7b34 Binary files /dev/null and b/res/screen-density-xhigh/BG.png differ diff --git a/res/screen-density-xhigh/RB07_unlock_circle03.png b/res/screen-density-xhigh/RB07_unlock_circle03.png new file mode 100644 index 0000000..07f8dbe Binary files /dev/null and b/res/screen-density-xhigh/RB07_unlock_circle03.png differ diff --git a/res/screen-density-xhigh/RB07_unlock_inner_circle.png b/res/screen-density-xhigh/RB07_unlock_inner_circle.png new file mode 100644 index 0000000..6faa699 Binary files /dev/null and b/res/screen-density-xhigh/RB07_unlock_inner_circle.png differ diff --git a/res/screen-density-xhigh/RB07_unlock_outer_circle.png b/res/screen-density-xhigh/RB07_unlock_outer_circle.png new file mode 100644 index 0000000..ce2bd57 Binary files /dev/null and b/res/screen-density-xhigh/RB07_unlock_outer_circle.png differ diff --git a/res/screen-size-normal/IDL_LOCK_FORM.xml b/res/screen-size-normal/IDL_LOCK_FORM.xml new file mode 100644 index 0000000..4a6a6f4 --- /dev/null +++ b/res/screen-size-normal/IDL_LOCK_FORM.xml @@ -0,0 +1,14 @@ + + + + + + 720 +
+ + + + +
diff --git a/res/slk-SK.xml b/res/slk-SK.xml new file mode 100644 index 0000000..6598e47 --- /dev/null +++ b/res/slk-SK.xml @@ -0,0 +1,7 @@ + + + Žiadna SIM + Odomknite prejdením po displeji + diff --git a/res/slv-SI.xml b/res/slv-SI.xml new file mode 100644 index 0000000..03e3b40 --- /dev/null +++ b/res/slv-SI.xml @@ -0,0 +1,7 @@ + + + Ni SIM + Za odklep potegnite po zaslonu + diff --git a/res/spa-ES.xml b/res/spa-ES.xml new file mode 100644 index 0000000..06be0a7 --- /dev/null +++ b/res/spa-ES.xml @@ -0,0 +1,7 @@ + + + No hay SIM + Arrastre el dedo por la pantalla para desbloquear + diff --git a/res/spa-MX.xml b/res/spa-MX.xml new file mode 100644 index 0000000..11d28bd --- /dev/null +++ b/res/spa-MX.xml @@ -0,0 +1,7 @@ + + + No hay tarjeta SIM + Deslice el dedo para desbloquear + diff --git a/res/srp-RS.xml b/res/srp-RS.xml new file mode 100644 index 0000000..15182e2 --- /dev/null +++ b/res/srp-RS.xml @@ -0,0 +1,7 @@ + + + Nema SIM kartice + Za otključavanje prevuci prstom preko ekrana + diff --git a/res/swe-SE.xml b/res/swe-SE.xml new file mode 100644 index 0000000..a54e932 --- /dev/null +++ b/res/swe-SE.xml @@ -0,0 +1,7 @@ + + + Inget SIM + Svep över skärmen för att låsa upp + diff --git a/res/tur-TR.xml b/res/tur-TR.xml new file mode 100644 index 0000000..d9ed0a5 --- /dev/null +++ b/res/tur-TR.xml @@ -0,0 +1,7 @@ + + + SIM yok + Açmak için ekrana dokun + diff --git a/res/ukr-UA.xml b/res/ukr-UA.xml new file mode 100644 index 0000000..2e59e41 --- /dev/null +++ b/res/ukr-UA.xml @@ -0,0 +1,7 @@ + + + Немає SIM + Проведіть по екрану, щоб його розблокувати + diff --git a/res/uzb-UZ.xml b/res/uzb-UZ.xml new file mode 100644 index 0000000..0fa409d --- /dev/null +++ b/res/uzb-UZ.xml @@ -0,0 +1,7 @@ + + + SIM-karta yo‘q + Blokdan chiqarish uchun ekran ustida barmog‘ingizni suring + diff --git a/res/zho-CN.xml b/res/zho-CN.xml new file mode 100644 index 0000000..16d753d --- /dev/null +++ b/res/zho-CN.xml @@ -0,0 +1,7 @@ + + + 无 SIM 卡 + 滑动屏幕解锁 + diff --git a/res/zho-HK.xml b/res/zho-HK.xml new file mode 100644 index 0000000..c02d22b --- /dev/null +++ b/res/zho-HK.xml @@ -0,0 +1,7 @@ + + + 無 SIM 卡 + 掃動屏幕以解鎖 + diff --git a/res/zho-SG.xml b/res/zho-SG.xml new file mode 100644 index 0000000..16d753d --- /dev/null +++ b/res/zho-SG.xml @@ -0,0 +1,7 @@ + + + 无 SIM 卡 + 滑动屏幕解锁 + diff --git a/res/zho-TW.xml b/res/zho-TW.xml new file mode 100644 index 0000000..40676e0 --- /dev/null +++ b/res/zho-TW.xml @@ -0,0 +1,7 @@ + + + 無 SIM 卡 + 滑動螢幕以解鎖 + diff --git a/shared/data/nofile.dummy b/shared/data/nofile.dummy new file mode 100644 index 0000000..e69de29 diff --git a/shared/res/screen-density-xhigh/mainmenu.png b/shared/res/screen-density-xhigh/mainmenu.png new file mode 100644 index 0000000..b0979b1 Binary files /dev/null and b/shared/res/screen-density-xhigh/mainmenu.png differ diff --git a/shared/trusted/nofile.dummy b/shared/trusted/nofile.dummy new file mode 100644 index 0000000..e69de29 diff --git a/src/LcLockApp.cpp b/src/LcLockApp.cpp new file mode 100644 index 0000000..3706b08 --- /dev/null +++ b/src/LcLockApp.cpp @@ -0,0 +1,131 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.1 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +/** + * @file LcLockApp.cpp + * @brief Displays the lock screen; initializing point of the app + */ + + +#include "LcLockApp.h" +#include "LcLockForm.h" +#include "LcMainFrame.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::System; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +LockApp::LockApp(void) +{ + +} + +LockApp::~LockApp(void) +{ + +} + +UiApp* +LockApp::CreateInstance(void) +{ + return new LockApp(); +} + +bool +LockApp::OnAppInitialized(void) +{ + MainFrame* pMainFrame = new (std::nothrow) MainFrame(); + pMainFrame->Construct(); + pMainFrame->SetName(L"LockScreen"); + AddFrame(*pMainFrame); + PowerManager::AddScreenEventListener(*this); + return true; +} + +bool +LockApp::OnAppInitializing(AppRegistry& appRegistry) +{ + return true; +} + +bool +LockApp::OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination) +{ + return true; +} + +bool +LockApp::OnAppWillTerminate(void) +{ + return true; +} + +void +LockApp::OnBackground(void) +{ + LockForm* pLockForm = static_cast(GetAppFrame()->GetFrame()->GetCurrentForm()); + + if (pLockForm != null) + { + pLockForm->StopDrawingUpdates(); + } +} + +void +LockApp::OnBatteryLevelChanged(BatteryLevel batteryLevel) +{ + +} + +void +LockApp::OnForeground(void) +{ + LockForm* pLockForm = static_cast(GetAppFrame()->GetFrame()->GetCurrentForm()); + + if (pLockForm != null) + { + pLockForm->StartDrawingUpdates(); + } +} + +void +LockApp::OnLowMemory(void) +{ + +} + +void +LockApp::OnScreenOff(void) +{ + LockForm* pLockForm = static_cast(GetAppFrame()->GetFrame()->GetCurrentForm()); + + if (pLockForm != null) + { + pLockForm->StopDrawingUpdates(); + } +} + +void +LockApp::OnScreenOn(void) +{ + LockForm* pLockForm = static_cast(GetAppFrame()->GetFrame()->GetCurrentForm()); + + if (pLockForm != null) + { + pLockForm->StartDrawingUpdates(); + } +} diff --git a/src/LcLockEntry.cpp b/src/LcLockEntry.cpp new file mode 100644 index 0000000..39a3c82 --- /dev/null +++ b/src/LcLockEntry.cpp @@ -0,0 +1,57 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.1 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file LcLockEntry.cpp + * @brief Entry point for the application code. + */ + +#include "LcLockApp.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +_EXPORT_ int OspMain(int argc, char* pArgv[]); + +/** + * The entry function of Tizen application called by the operating system. + */ +int +OspMain(int argc, char* pArgv[]) +{ + AppLog("Application started."); + ArrayList args(SingleObjectDeleter); + args.Construct(); + + for (int i = 0; i < argc; i++) + { + args.Add(new (std::nothrow) String(pArgv[i])); + } + + result r = Tizen::App::UiApp::Execute(LockApp::CreateInstance, &args); + TryLog(r == E_SUCCESS, "[%s] Application execution failed", GetErrorMessage(r)); + AppLog("Application finished."); + + return static_cast(r); +} +#ifdef __cplusplus +} +#endif // __cplusplus diff --git a/src/LcLockForm.cpp b/src/LcLockForm.cpp new file mode 100644 index 0000000..8765c93 --- /dev/null +++ b/src/LcLockForm.cpp @@ -0,0 +1,1020 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.1 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file LcLockForm.cpp + * @brief Keeps implementation of LockForm which, + * Displays a locked Screen with a Current date time and text to help unlock. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "LcLockForm.h" +#include "LcTypes.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Utility; +using namespace Tizen::Graphics; +using namespace Tizen::Io; +using namespace Tizen::Locales; +using namespace Tizen::Media; +using namespace Tizen::System; +using namespace Tizen::Telephony; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Animations; +using namespace Tizen::Ui::Controls; + +LockForm::LockForm(void) + : __opacityInverted(false) + , __unlockState(false) + , __pLockImageList(null) + , __pSwipeLabelList(null) + , __pDateTimeTimer(null) + , __pInnerCircleBitmap(null) + , __pLockIconVisualElement(null) + , __pLockInnerCircleVisualElement(null) + , __pLockOuterCircleVisualElement(null) + , __pUnlockIconVisualElement(null) + , __pUnlockInnerCircleVisualElement(null) + , __pAmPmLabel(null) + , __pBackgroundLabel(null) + , __pDateLabel(null) + , __pLockIconLabel(null) + , __pOperatorLabel(null) + , __pTimeLabel(null) + , __pUnlockIconLabel(null) + , __pLockPanel(null) + , __pMainPanel(null) + , __pUnlockPanel(null) +{ + +} + +LockForm::~LockForm(void) +{ + +} + +Bitmap* +LockForm::GetBitmapN(const String& imagePath) +{ + Bitmap* pBitmap = null; + Image* pImage = null; + String fullImageName; + result r = E_SUCCESS; + fullImageName.Append(imagePath); + pImage = new (std::nothrow) Image(); + TryCatch(pImage != null, , "Cannot allocate for Image instance"); + r = pImage->Construct(); + TryCatch(r == E_SUCCESS, , "Image::Construct() failed error = %s", GetErrorMessage(r)); + + if (fullImageName.EndsWith(L"jpg") || fullImageName.EndsWith(L"JPG") || fullImageName.EndsWith(L"jpeg") || fullImageName.EndsWith(L"JPEG")) + { + pBitmap = pImage->DecodeN(fullImageName, BITMAP_PIXEL_FORMAT_RGB565); + } + else if (fullImageName.EndsWith(L"bmp") || fullImageName.EndsWith(L"BMP")) + { + pBitmap = pImage->DecodeN(fullImageName, BITMAP_PIXEL_FORMAT_RGB565); + } + else if (fullImageName.EndsWith(L"png") || fullImageName.EndsWith(L"PNG") || fullImageName.EndsWith(L"wbmp") || fullImageName.EndsWith(L"WBMP")) + { + pBitmap = pImage->DecodeN(fullImageName, BITMAP_PIXEL_FORMAT_ARGB8888); + } + else if (fullImageName.EndsWith(L"gif") || fullImageName.EndsWith(L"GIF")) + { + pBitmap = pImage->DecodeN(fullImageName, BITMAP_PIXEL_FORMAT_RGB565); + } + + TryCatch(pBitmap != null, , "pImage->DecodeN failed with error (%s) for image %ls", GetErrorMessage(GetLastResult()), fullImageName.GetPointer()); + delete pImage; + return pBitmap; + +CATCH: + + if (pImage != null) + { + delete pImage; + pImage = null; + } + + return null; +} + +bool +LockForm::Initialize(void) +{ + result r = Construct(L"IDL_LOCK_FORM"); + TryCatch(r == E_SUCCESS, r = GetLastResult(), "Form Construct failed %s", GetErrorMessage(r)); + return true; + +CATCH: + return false; +} + +result +LockForm::OnInitializing(void) +{ + AppLogDebug("ENTER"); + Label* pHelpTextLabel = null; + String resourceText; + String wallpaperPath; + int unlockBounds = 0; + Bitmap* pBackgroundBitmap = null; + Canvas* pCanvas = null; + Rectangle lockRectangle; + Rectangle backgroundLabelRectangle; + Bitmap* pLockBitmap = null; + String imageName(UNLOCK_PRESS_BASE); + bool is24HrFormat = false; + AppResource* pAppResource = null; + Bitmap* pLockImageTemp = null; + int lockBounds = (W_INNER_CIRCLE_PANEL / sqrt(2)); + + pAppResource = UiApp::GetInstance()->GetAppResource(); + + //Background label + backgroundLabelRectangle = GetClientAreaBounds(); + backgroundLabelRectangle.x = 0; + backgroundLabelRectangle.y = 0; + __pBackgroundLabel = new (std::nothrow) Label(); + __pBackgroundLabel->Construct(backgroundLabelRectangle, L""); + AddControl(__pBackgroundLabel); + SetControlAlwaysAtBottom(*__pBackgroundLabel, true); + + SettingInfo::AddSettingEventListener(*this); + + //Set wallpaper + SettingInfo::GetValue(LOCK_WALLPAPER_KEY, wallpaperPath); + if (!wallpaperPath.IsEmpty()) + { + pBackgroundBitmap = LockForm::GetBitmapN(wallpaperPath); + + if (pBackgroundBitmap == null) + { + pBackgroundBitmap = pAppResource->GetBitmapN(IDB_BACKGROUND, BITMAP_PIXEL_FORMAT_ARGB8888); + } + + if (pBackgroundBitmap != null) + { + pBackgroundBitmap->SetScalingQuality(BITMAP_SCALING_QUALITY_HIGH); + pBackgroundBitmap->Scale(Dimension(__pBackgroundLabel->GetWidth(), __pBackgroundLabel->GetHeight())); + __pBackgroundLabel->SetBackgroundBitmap(*pBackgroundBitmap); + delete pBackgroundBitmap; + } + } + + __pLockImageList = new (std::nothrow) ArrayListT(); + __pLockImageList->Construct(); + + //Label to display Date + __pDateLabel = new (std::nothrow) Label(); + __pDateLabel->Construct(Rectangle(X_DATE_LABEL, backgroundLabelRectangle.height - Y_DATE_LABEL_OFFSET, W_DATE_LABEL, H_DATE_LABEL), L""); + __pDateLabel->SetTextConfig(FONT_SIZE_DATE_LABEL, LABEL_TEXT_STYLE_BOLD); + __pDateLabel->SetTextColor(COLOR_LABEL_TEXT); + __pDateLabel->SetTextHorizontalAlignment(ALIGNMENT_RIGHT); + AddControl(__pDateLabel); + + //Label to display time + __pTimeLabel = new (std::nothrow) Label(); + __pTimeLabel->Construct(Rectangle(X_TIME_LABEL, backgroundLabelRectangle.height - Y_TIME_LABEL_OFFSET, W_TIME_LABEL, H_TIME_LABEL), L""); + __pTimeLabel->SetTextConfig(FONT_SIZE_TIME_LABEL, LABEL_TEXT_STYLE_BOLD); + __pTimeLabel->SetTextColor(COLOR_LABEL_TEXT); + __pTimeLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + AddControl(__pTimeLabel); + + //Label to display Am/Pm + SettingInfo::GetValue(SETTINGS_TIME_FORMAT_IS24_KEY, is24HrFormat); + if (!is24HrFormat) + { + __pAmPmLabel = new (std::nothrow) Label(); + __pAmPmLabel->Construct(Rectangle(X_AM_PM_LABEL, backgroundLabelRectangle.height - Y_AM_PM_LABEL_OFFSET, W_AM_PM_LABEL, H_AM_PM_LABEL), L""); + __pAmPmLabel->SetTextConfig(FONT_SIZE_AM_PM_LABEL, LABEL_TEXT_STYLE_BOLD); + __pAmPmLabel->SetTextColor(COLOR_LABEL_TEXT); + __pAmPmLabel->SetTextHorizontalAlignment(ALIGNMENT_RIGHT); + AddControl(__pAmPmLabel); + } + + //Update date and time labels with the current system Date and time + UpdateDateTimeLabels(); + + // The Main Panel, which will Show the Lock and Unlock animations and keeps all controls related to Lock here. + __pMainPanel = new (std::nothrow) Panel(); + __pMainPanel->Construct(Rectangle(X_MAIN_PANEL, backgroundLabelRectangle.height - Y_MAIN_PANEL_OFFSET, GetClientAreaBounds().width, H_MAIN_PANEL), GROUP_STYLE_NONE); + __pMainPanel->AddTouchEventListener(*this); + AddControl(__pMainPanel); + + //Label to show Guide text for unlocking + pHelpTextLabel = new (std::nothrow) Label(); + pHelpTextLabel->Construct(Rectangle(X_HELP_TEXT_LABEL, backgroundLabelRectangle.height - H_HELP_TEXT_LABEL, GetWidth(), H_HELP_TEXT_LABEL), L""); + pAppResource->GetString(L"IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK", resourceText); + pHelpTextLabel->SetText(resourceText); + pHelpTextLabel->SetBackgroundColor(COLOR_HELP_TEXT_BG); + pHelpTextLabel->SetTextColor(COLOR_LABEL_TEXT); + pHelpTextLabel->SetTextConfig(FONT_SIZE_HELP_TEXT, LABEL_TEXT_STYLE_BOLD); + pHelpTextLabel->SetTextHorizontalAlignment(ALIGNMENT_CENTER); + AddControl(pHelpTextLabel); + + //The Lock Panel which keeps the Inner circle animation and the Lock icon label + __pLockPanel = new (std::nothrow) Panel(); + __pLockPanel->Construct(Rectangle(X_INNER_CIRCLE_PANEL, Y_INNER_CIRCLE_PANEL, W_INNER_CIRCLE_PANEL, H_INNER_CIRCLE_PANEL), GROUP_STYLE_NONE); + __pLockPanel->AddTouchEventListener(*this); + __pMainPanel->AddControl(__pLockPanel); + + //Lock Label for showing Lock Icon and animation + lockBounds = (W_INNER_CIRCLE_PANEL / sqrt(2)); + __pLockIconLabel = new (std::nothrow) Label(); + __pLockIconLabel->Construct(Rectangle(X_LOCK_ICON, Y_LOCK_ICON, lockBounds, lockBounds), L""); + __pLockIconLabel->AddTouchEventListener(*this); + __pLockPanel->AddControl(__pLockIconLabel); + + //Visual element to show the animation of Outer circle + __pLockOuterCircleVisualElement = new (std::nothrow) VisualElement(); + __pLockOuterCircleVisualElement->Construct(); + __pLockOuterCircleVisualElement->SetBounds(FloatRectangle(0, 0, W_LOCK_OUTER_CIRCLE, H_LOCK_OUTER_CIRCLE)); + __pLockOuterCircleVisualElement->SetName(LOCK_OUTER_CIRCLE_VISUAL_ELEMENT); + __pLockOuterCircleVisualElement->SetShowState(true); + __pLockOuterCircleVisualElement->SetOpacity(0.0f); + __pLockOuterCircleVisualElement->SetClipChildrenEnabled(true); + __pMainPanel->GetVisualElement()->AttachChild(*__pLockOuterCircleVisualElement); + + //Inner visual element, shows the animation in inner circle + __pLockInnerCircleVisualElement = new (std::nothrow) VisualElement(); + __pLockInnerCircleVisualElement->Construct(); + __pLockInnerCircleVisualElement->SetBounds(FloatRectangle(0, 0, W_INNER_CIRCLE_PANEL, H_INNER_CIRCLE_PANEL)); + __pLockInnerCircleVisualElement->SetName(LOCK_INNER_CIRCLE_VISUAL_ELEMENT); + __pLockInnerCircleVisualElement->SetShowState(true); + __pLockInnerCircleVisualElement->SetOpacity(1.0f); + __pLockPanel->GetVisualElement()->AttachChild(*__pLockInnerCircleVisualElement); + + __pInnerCircleBitmap = pAppResource->GetBitmapN(IDB_UNLOCK_CIRCLE01, BITMAP_PIXEL_FORMAT_ARGB8888); + pCanvas = __pLockInnerCircleVisualElement->GetCanvasN(); + if (pCanvas != null && __pInnerCircleBitmap != null) + { + pCanvas->SetBackgroundColor(COLOR_VISUAL_ELEMENT); + pCanvas->Clear(); + pCanvas->DrawBitmap(Rectangle(0, 0, W_INNER_CIRCLE_PANEL, H_INNER_CIRCLE_PANEL), *__pInnerCircleBitmap); + delete pCanvas; + pCanvas = null; + } + + //This visual element keeps the Lock icons and shows animation while moving the touch. + __pLockIconVisualElement = new (std::nothrow) VisualElement(); + __pLockIconVisualElement->Construct(); + lockRectangle = __pLockIconLabel->GetBounds(); + __pLockIconVisualElement->SetBounds(FloatRectangle(0, 0, lockBounds, lockBounds)); + __pLockIconVisualElement->SetName(LOCK_ICON_VISUAL_ELEMENT); + __pLockIconVisualElement->SetShowState(true); + __pLockIconVisualElement->SetOpacity(1.0f); + __pLockIconLabel->GetVisualElement()->AttachChild(*__pLockIconVisualElement); + imageName.Append(1); + imageName.Append(UNLOCK_PRESS_EXTENSION); + pLockBitmap = pAppResource->GetBitmapN(imageName, BITMAP_PIXEL_FORMAT_ARGB8888); + __pLockImageList->Add(pLockBitmap); + pCanvas = __pLockIconVisualElement->GetCanvasN(); + if (pCanvas != null) + { + pCanvas->SetBackgroundColor(COLOR_VISUAL_ELEMENT); + pCanvas->Clear(); + __pLockImageList->GetAt(0, pLockImageTemp); + pCanvas->DrawBitmap(Rectangle(0, 0, lockBounds, lockBounds), *pLockImageTemp); + delete pCanvas; + pCanvas = null; + } + + // The main container panel, which keeps all the controls and visual elements required for Unlock i.e. Right side Ui Animation. + __pUnlockPanel = new (std::nothrow) Panel(); + __pUnlockPanel->Construct(Rectangle(X_UNLOCK_PANEL, Y_UNLOCK_PANEL, W_UNLOCK_PANEL, H_UNLOCK_PANEL), GROUP_STYLE_NONE); + __pUnlockPanel->SetBackgroundColor(COLOR_VISUAL_ELEMENT); + __pMainPanel->AddControl(__pUnlockPanel); + + //Unlock Label for animation + __pUnlockIconLabel = new (std::nothrow) Label(); + __pUnlockIconLabel->Construct(Rectangle(X_UNLOCK_CIRCLE, Y_UNLOCK_CIRCLE, W_UNLOCK_PANEL, H_UNLOCK_PANEL), L""); + __pUnlockIconLabel->AddTouchEventListener(*this); + __pUnlockPanel->AddControl(__pUnlockIconLabel); + + // Surrounding circle to the Unlock icon to show unlock animation + __pUnlockInnerCircleVisualElement = new (std::nothrow) VisualElement(); + __pUnlockInnerCircleVisualElement->Construct(); + __pUnlockInnerCircleVisualElement->SetBounds(FloatRectangle(X_UNLOCK_CIRCLE, Y_UNLOCK_CIRCLE, W_UNLOCK_PANEL, H_UNLOCK_PANEL)); + __pUnlockInnerCircleVisualElement->SetName(UNLOCK_INNER_CIRCLE_VISUAL_ELEMENT); + __pUnlockInnerCircleVisualElement->SetShowState(true); + __pUnlockInnerCircleVisualElement->SetOpacity(0.0f); + __pUnlockPanel->GetVisualElement()->AttachChild(*__pUnlockInnerCircleVisualElement); + + unlockBounds = (W_UNLOCK_PANEL / sqrt(2)); + // This visual element keeps the unlock image to show the unlocking effect + __pUnlockIconVisualElement = new (std::nothrow) VisualElement(); + __pUnlockIconVisualElement->Construct(); + __pUnlockIconVisualElement->SetBounds(FloatRectangle(X_LOCK_ICON, Y_LOCK_ICON, unlockBounds, unlockBounds)); + __pUnlockIconVisualElement->SetName(UNLOCK_ICON_VISUAL_ELEMENT); + __pUnlockIconVisualElement->SetShowState(true); + __pUnlockIconVisualElement->SetOpacity(0.0f); + __pUnlockIconLabel->GetVisualElement()->AttachChild(*__pUnlockIconVisualElement); + + // Constructs an array list to store the dots labels + __pSwipeLabelList = new (std::nothrow) ArrayList(); + __pSwipeLabelList->Construct(); + + //Label to display Operator's name + __pOperatorLabel = new (std::nothrow) Label(); + __pOperatorLabel->Construct(Rectangle(X_OPERATOR_LABEL, Y_OPERATOR_LABEL, W_OPERATOR_LABEL, H_OPERATOR_LABEL), L""); + __pOperatorLabel->SetTextHorizontalAlignment(ALIGNMENT_RIGHT); + __pOperatorLabel->SetTextColor(Color::GetColor(COLOR_ID_WHITE)); + AddControl(__pOperatorLabel); + + // constructs a timer to update the date and time on the screen + __pDateTimeTimer = new (std::nothrow) Timer(); + __pDateTimeTimer->Construct(*this); + + //starts the timer to update date and time + __pDateTimeTimer->Start(DURATION_FOR_LAZY_INIT); + + AppLogDebug("EXIT"); + return E_SUCCESS; +} + +result +LockForm::OnTerminating(void) +{ + AppLogDebug("Enter :"); + + SettingInfo::RemoveSettingEventListener(*this); + + if (__pDateTimeTimer != null) + { + __pDateTimeTimer->Cancel(); + delete __pDateTimeTimer; + __pDateTimeTimer = null; + } + + if (__pInnerCircleBitmap != null) + { + delete __pInnerCircleBitmap; + __pInnerCircleBitmap = null; + } + + if (__pLockImageList != null) + { + __pLockImageList->RemoveAll(); + delete __pLockImageList; + __pLockImageList = null; + } + + if (__pLockOuterCircleVisualElement != null) + { + __pLockOuterCircleVisualElement->RemoveAllAnimations(); + __pLockOuterCircleVisualElement->Destroy(); + __pLockOuterCircleVisualElement = null; + } + + if (__pLockIconVisualElement != null) + { + __pLockIconVisualElement->RemoveAllAnimations(); + __pLockIconVisualElement->Destroy(); + __pLockIconVisualElement = null; + } + + if (__pUnlockInnerCircleVisualElement != null) + { + __pUnlockInnerCircleVisualElement->RemoveAllAnimations(); + __pUnlockInnerCircleVisualElement->Destroy(); + __pUnlockInnerCircleVisualElement = null; + } + + if (__pLockInnerCircleVisualElement != null) + { + __pLockInnerCircleVisualElement->RemoveAllAnimations(); + __pLockInnerCircleVisualElement->Destroy(); + __pLockInnerCircleVisualElement = null; + } + + if (__pUnlockIconVisualElement != null) + { + __pUnlockIconVisualElement->RemoveAllAnimations(); + __pUnlockIconVisualElement->Destroy(); + __pUnlockIconVisualElement = null; + } + + if (__pSwipeLabelList != null) + { + for (int labelCount = 0; labelCount < COUNT_SWIPE_LABEL; labelCount++) + { + Label* pLabel = static_cast(__pSwipeLabelList->GetAt(labelCount)); + + if (pLabel != null) + { + String visualElementName(SWIPE_VISUAL_ELEMENT_NAME_BASE); + visualElementName.Append(labelCount); + VisualElement* pTempVisualElement = pLabel->GetVisualElement()->GetChild(visualElementName, true); + + if (pTempVisualElement != null) + { + pTempVisualElement->RemoveAllAnimations(); + pTempVisualElement->Destroy(); + pTempVisualElement = null; + } + } + } + + __pSwipeLabelList->RemoveAll(); + delete __pSwipeLabelList; + __pSwipeLabelList = null; + } + + AppLogDebug("EXIT"); + return E_SUCCESS; +} + +// Calls the GetDateTime() of the Main UnlockForm class to get the current updated system date and time +// It then updates the date and time label on the main screen +// also restarts the timer to continue the update +void +LockForm::OnTimerExpired(Timer& timer) +{ + if (__pDateTimeTimer != null && timer.Equals(*__pDateTimeTimer)) + { + InitializeControls(); + UpdateDateTimeLabels(); + result r = __pDateTimeTimer->Start(DATE_TIME_TIMER_DURATION); + TryLog(r == E_SUCCESS, "__pDateTimeTimer->Start failed with error %s", GetErrorMessage(r)); + } +} + +void +LockForm::OnTouchMoved(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo) +{ + if (currentPosition.y < Y_UNLOCK_PANEL) + { + Label* pSwipeLabel = null; + __unlockState = false; + __pLockOuterCircleVisualElement->SetOpacity(0.0f); + __pLockIconVisualElement->SetOpacity(1.0f); + __pLockInnerCircleVisualElement->SetOpacity(1.0f); + + for (int labelCount = 0; labelCount < COUNT_SWIPE_LABEL; labelCount++) + { + String visualElementName(SWIPE_VISUAL_ELEMENT_NAME_BASE); + VisualElement* pSwipeVisualElement = null; + visualElementName.Append(labelCount); + pSwipeLabel = static_cast(__pSwipeLabelList->GetAt(labelCount)); + pSwipeVisualElement = pSwipeLabel->GetVisualElement()->GetChild(visualElementName, true); + pSwipeVisualElement->SetOpacity(0.0f); + } + + __pUnlockIconVisualElement->SetOpacity(0.0f); + __pUnlockInnerCircleVisualElement->SetOpacity(0.0f); + } + + if (__unlockState) + { + if (currentPosition.x > X_MIN_OFFSET && currentPosition.x < X_UNLOCK_PANEL) + { + Bitmap* pLockBitmap = null; + Canvas* pCanvas = null; + float count = (X_UNLOCK_PANEL - X_MIN_OFFSET) / DIVISION_FACTOR_FOR_COUNT; + int distance = (X_UNLOCK_PANEL - X_MIN_OFFSET) / COUNT_LOCK_IMAGES; + int opacityFactor = (currentPosition.x - X_MIN_OFFSET) / count; + distance = (currentPosition.x - X_MIN_OFFSET) / distance; + int unlockBounds = (W_UNLOCK_PANEL / sqrt(2)); + pCanvas = __pUnlockIconVisualElement->GetCanvasN(); + if (pCanvas != null) + { + pCanvas->SetBackgroundColor(COLOR_VISUAL_ELEMENT); + pCanvas->Clear(); + distance = (distance > X_MIN_DISTANCE ? X_MIN_DISTANCE : distance); + __pLockImageList->GetAt(distance, pLockBitmap); + pCanvas->DrawBitmap(Rectangle(0, 0, unlockBounds, unlockBounds), *pLockBitmap); + delete pCanvas; + pCanvas = null; + } + + __pUnlockIconVisualElement->SetOpacity((opacityFactor * 0.01f)); + __pLockOuterCircleVisualElement->SetOpacity(0.50f - (opacityFactor * 0.01f)); + __pLockIconVisualElement->SetOpacity(1.0f - (opacityFactor * 0.01f)); + + + if (__pLockIconVisualElement->GetOpacity() < 0.10f) + { + __pLockIconVisualElement->SetOpacity(0.10f); + } + + __pUnlockInnerCircleVisualElement->SetOpacity(opacityFactor * 0.01f); + __pLockInnerCircleVisualElement->SetOpacity(1.0f - (opacityFactor * 0.01f)); + } + + if (currentPosition.x > X_UNLOCK_PANEL / 2 && currentPosition.x < X_UNLOCK_PANEL && currentPosition.y < Y_TOUCH_PRESSED_VALID) + { + __opacityInverted = true; + for (int i = 0; i < COUNT_SWIPE_LABEL; i++) + { + String visualElementName(SWIPE_VISUAL_ELEMENT_NAME_BASE); + Label* pSwipeLabel = null; + VisualElement* pSwipeVisualElement = null; + visualElementName.Append(i); + pSwipeLabel = static_cast(__pSwipeLabelList->GetAt(i)); + pSwipeVisualElement = pSwipeLabel->GetVisualElement()->GetChild(visualElementName, true); + + switch (i) + { + case 0: + { + pSwipeVisualElement->SetOpacity(0.1f); + } + break; + + case 1: + { + pSwipeVisualElement->SetOpacity(0.2f); + } + break; + + case 2: + { + pSwipeVisualElement->SetOpacity(0.5f); + } + break; + + case 3: + { + pSwipeVisualElement->SetOpacity(0.7f); + } + break; + + case 4: + { + pSwipeVisualElement->SetOpacity(1.0f); + } + break; + + default: + { + + } + break; + } + } + } + else if (__opacityInverted && currentPosition.x <= X_UNLOCK_PANEL / 2 && + currentPosition.x > X_TOUCH_PRESSED_VALID && currentPosition.y < Y_TOUCH_PRESSED_VALID) + { + __opacityInverted = false; + for (int i = 0; i < COUNT_SWIPE_LABEL; i++) + { + String visualElementName(SWIPE_VISUAL_ELEMENT_NAME_BASE); + Label* pSwipeLabel = null; + VisualElement* pSwipeVisualElement = null; + visualElementName.Append(i); + pSwipeLabel = static_cast(__pSwipeLabelList->GetAt(i)); + pSwipeVisualElement = pSwipeLabel->GetVisualElement()->GetChild(visualElementName, true); + + switch (i) + { + case 0: + { + pSwipeVisualElement->SetOpacity(1.0f); + } + break; + + case 1: + { + pSwipeVisualElement->SetOpacity(0.7f); + } + break; + + case 2: + { + pSwipeVisualElement->SetOpacity(0.5f); + } + break; + + case 3: + { + pSwipeVisualElement->SetOpacity(0.2f); + } + break; + + case 4: + { + pSwipeVisualElement->SetOpacity(0.1f); + } + break; + + default: + { + + } + break; + } + } + } + } +} + +//In OnTouchPressed, It creates the three visual elements and starts the animation of opacity and rotation variation +void +LockForm::OnTouchPressed(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo) +{ + Canvas* pCanvas = null; + int unlockBounds; + + if (currentPosition.x < X_TOUCH_PRESSED_VALID && currentPosition.y < Y_TOUCH_PRESSED_VALID) + { + Bitmap* pLockBitmap = null; + __unlockState = true; + __pLockOuterCircleVisualElement->SetOpacity(0.50f); + + for (int i = 0; i < COUNT_SWIPE_LABEL; i++) + { + String visualElementName(SWIPE_VISUAL_ELEMENT_NAME_BASE); + Label* pSwipeLabel = null; + VisualElement* pSwipeVisualElement = null; + visualElementName.Append(i); + pSwipeLabel = static_cast(__pSwipeLabelList->GetAt(i)); + pSwipeVisualElement = pSwipeLabel->GetVisualElement()->GetChild(visualElementName, true); + + switch (i) + { + case 0: + { + pSwipeVisualElement->SetOpacity(1.0f); + } + break; + + case 1: + { + pSwipeVisualElement->SetOpacity(0.7f); + } + break; + + case 2: + { + pSwipeVisualElement->SetOpacity(0.5f); + } + break; + + case 3: + { + pSwipeVisualElement->SetOpacity(0.2f); + } + break; + + case 4: + { + pSwipeVisualElement->SetOpacity(0.1f); + } + break; + + default: + { + //default case + } + break; + } + } + + unlockBounds = (W_UNLOCK_PANEL / sqrt(2)); + pCanvas = __pUnlockIconVisualElement->GetCanvasN(); + if (pCanvas != null) + { + pCanvas->SetBackgroundColor(COLOR_VISUAL_ELEMENT); + pCanvas->Clear(); + __pLockImageList->GetAt(0, pLockBitmap); + pCanvas->DrawBitmap(Rectangle(0, 0, unlockBounds, unlockBounds), *pLockBitmap); + delete pCanvas; + pCanvas = null; + } + + __pUnlockIconVisualElement->SetOpacity(0.10f); + } + +} + +// On Touch released, the animation and the visual elements disappear +void +LockForm::OnTouchReleased(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo) +{ + if (__unlockState) + { + if (currentPosition.x > X_UNLOCK_PANEL && currentPosition.y > Y_UNLOCK_PANEL) + { + __unlockState = false; + UiApp::GetInstance()->Terminate(); + } + else + { + Canvas* pCanvas = null; + __pLockIconVisualElement->SetOpacity(1.0f); + __pLockInnerCircleVisualElement->SetOpacity(1.0f); + pCanvas = __pUnlockIconLabel->GetCanvasN(); + if (pCanvas != null) + { + pCanvas->SetBackgroundColor(COLOR_VISUAL_ELEMENT); + pCanvas->Clear(); + delete pCanvas; + pCanvas = null; + } + + __pUnlockIconVisualElement->SetOpacity(0.0f); + __pUnlockInnerCircleVisualElement->SetOpacity(0.0f); + __pLockOuterCircleVisualElement->SetOpacity(0.0f); + + for (int i = 0; i < COUNT_SWIPE_LABEL; i++) + { + String visualElementName(SWIPE_VISUAL_ELEMENT_NAME_BASE); + Label* pSwipeLabel = null; + VisualElement* pSwipeVisualElement = null; + visualElementName.Append(i); + pSwipeLabel = static_cast(__pSwipeLabelList->GetAt(i)); + pSwipeVisualElement = pSwipeLabel->GetVisualElement()->GetChild(visualElementName, true); + pSwipeVisualElement->SetOpacity(0.0f); + } + } + } + + __unlockState = false; +} + +void +LockForm::OnSettingChanged(String& key) +{ + if (key.CompareTo(LOCK_WALLPAPER_KEY) == 0) + { + String wallPaperPath; + + SettingInfo::GetValue(LOCK_WALLPAPER_KEY, wallPaperPath); + + if (!wallPaperPath.IsEmpty()) + { + Bitmap* pBackgroundBitmap = LockForm::GetBitmapN(wallPaperPath); + + if (pBackgroundBitmap == null) + { + pBackgroundBitmap = App::GetInstance()->GetAppResource()->GetBitmapN(IDB_BACKGROUND, BITMAP_PIXEL_FORMAT_ARGB8888); + } + + if (pBackgroundBitmap != null) + { + pBackgroundBitmap->SetScalingQuality(BITMAP_SCALING_QUALITY_HIGH); + pBackgroundBitmap->Scale(Dimension(__pBackgroundLabel->GetWidth(), __pBackgroundLabel->GetHeight())); + __pBackgroundLabel->SetBackgroundBitmap(*pBackgroundBitmap); + __pBackgroundLabel->Invalidate(false); + delete pBackgroundBitmap; + } + } + } +} + +/** + * calls the GetCurrentTime() method of the System class of the Tizen::System namespace to get the current time in standard time mode + * Also calls the GetSystemLocale() method of the LocalManager using the Tizen::Locales namespace to get the system locale of the device. + */ +void +LockForm::GetDateTime(String& date, String& time, String& amPm) +{ + bool is24HrFormat = false; + DateTimeFormatter* pTimeFormatter; + DateTime currentTime; + LocaleManager localManager; + + SystemTime::GetCurrentTime(STANDARD_TIME, currentTime); + localManager.Construct(); + pTimeFormatter = DateTimeFormatter::CreateDateTimeFormatterN(localManager.GetSystemLocale(), DATE_TIME_STYLE_FULL); + + if (pTimeFormatter != null) + { + pTimeFormatter->ApplyPattern(DATE_PATTERN); + pTimeFormatter->Format(currentTime, date); + SettingInfo::GetValue(SETTINGS_TIME_FORMAT_IS24_KEY, is24HrFormat); + + if (is24HrFormat) + { + pTimeFormatter->ApplyPattern(TIME_PATTERN_24HR); + } + else + { + pTimeFormatter->ApplyPattern(TIME_PATTERN); + } + + pTimeFormatter->Format(currentTime, time); + pTimeFormatter->ApplyPattern(AMPM_PATTERN); + pTimeFormatter->Format(currentTime, amPm); + delete pTimeFormatter; + } +} + +void +LockForm::InitializeControls(void) +{ + if (__pLockImageList->GetCount() > 1) + { + return; + } + + String operatorName; + String operName; + String resourceText; + Canvas* pCanvas = null; + Bitmap* pSwipeBitmap = null; + Bitmap* pOuterCircleBitmap = null; + AppResource* pAppResource = App::GetInstance()->GetAppResource(); + const int deltaX = X_MIN_DELTA_LABELS; + int xSwipeLabel = X_MIN_OFFSET; + SimStateManager simStateManager; + SimInfo simInfo; + + // Get Network operator's name + result r = simStateManager.Construct(); + r = simStateManager.GetSimInfo(simInfo); + pAppResource->GetString(L"IDS_COM_BODY_NO_SIM", resourceText); + + if (!IsFailed(r)) + { + operatorName = simInfo.GetSpn(); + operName.Append(operatorName); + + if (operName.IsEmpty()) + { + __pOperatorLabel->SetText(resourceText); + } + else + { + __pOperatorLabel->SetText(operName); + } + __pOperatorLabel->Invalidate(false); + } + + for (int lockImgageCount = 2; lockImgageCount <= COUNT_LOCK_IMAGES; lockImgageCount++) + { + Bitmap* pLockBitmap = null; + String imageName(UNLOCK_PRESS_BASE); + imageName.Append(lockImgageCount); + imageName.Append(UNLOCK_PRESS_EXTENSION); + pLockBitmap = pAppResource->GetBitmapN(imageName, BITMAP_PIXEL_FORMAT_ARGB8888); + + if (pLockBitmap != null) + { + __pLockImageList->Add(pLockBitmap); + } + } + + pSwipeBitmap = pAppResource->GetBitmapN(IDB_UNLOCK_CIRCLE03, BITMAP_PIXEL_FORMAT_ARGB8888); + TryCatch(pSwipeBitmap != null, , "GetBitmapFailed for IDB_UNLOCK_CIRCLE03 error %s", GetErrorMessage(GetLastResult())); + pOuterCircleBitmap = pAppResource->GetBitmapN(IDB_UNLOCK_CIRCLE02, BITMAP_PIXEL_FORMAT_ARGB8888); + TryCatch(pOuterCircleBitmap != null, , "GetBitmapFailed for IDB_UNLOCK_CIRCLE02 error %s", GetErrorMessage(GetLastResult())); + + pCanvas = __pLockOuterCircleVisualElement->GetCanvasN(); + if (pCanvas != null) + { + pCanvas->SetBackgroundColor(COLOR_VISUAL_ELEMENT); + pCanvas->Clear(); + pCanvas->DrawBitmap(Rectangle(0, 0, W_LOCK_OUTER_CIRCLE, H_LOCK_OUTER_CIRCLE), *pOuterCircleBitmap); + delete pCanvas; + pCanvas = null; + } + + pCanvas = __pUnlockInnerCircleVisualElement->GetCanvasN(); + if (pCanvas != null) + { + pCanvas->SetBackgroundColor(COLOR_VISUAL_ELEMENT); + pCanvas->Clear(); + pCanvas->DrawBitmap(Rectangle(0, 0, W_INNER_CIRCLE_PANEL, H_INNER_CIRCLE_PANEL), *__pInnerCircleBitmap); + delete pCanvas; + pCanvas = null; + } + + // Constructs the Swipe Labels with the bitmap as background, adds the touch event Listener and adds them to the panel. + for (int i = 0; i < COUNT_SWIPE_LABEL; i++) + { + String visualElementName(SWIPE_VISUAL_ELEMENT_NAME_BASE); + VisualElement* pSwipeVisualElement = null; + Label* pSwipeLabel = new (std::nothrow) Label(); + pSwipeLabel->Construct(Rectangle(xSwipeLabel, Y_SWIPE_LABEL, W_SWIPE_LABEL, H_SWIPE_LABEL), L""); + pSwipeLabel->AddTouchEventListener(*this); + __pMainPanel->AddControl(pSwipeLabel); + __pSwipeLabelList->Add(pSwipeLabel); + visualElementName.Append(i); + pSwipeVisualElement = new (std::nothrow) VisualElement(); + pSwipeVisualElement->Construct(); + pSwipeVisualElement->SetBounds(FloatRectangle(0, 0, W_SWIPE_LABEL, H_SWIPE_LABEL)); + pSwipeVisualElement->SetName(visualElementName); + pSwipeVisualElement->SetShowState(true); + pSwipeVisualElement->SetOpacity(0.0f); + pSwipeLabel->GetVisualElement()->AttachChild(*pSwipeVisualElement); + pCanvas = pSwipeVisualElement->GetCanvasN(); + if (pCanvas != null) + { + pCanvas->SetBackgroundColor(COLOR_VISUAL_ELEMENT); + pCanvas->Clear(); + pCanvas->DrawBitmap(Rectangle(0, 0, W_SWIPE_LABEL, H_SWIPE_LABEL), *pSwipeBitmap); + delete pCanvas; + pCanvas = null; + } + xSwipeLabel += deltaX; + } + +CATCH: + + if (pSwipeBitmap != null) + { + delete pSwipeBitmap; + pSwipeBitmap = null; + } + + if (pOuterCircleBitmap != null) + { + delete pOuterCircleBitmap; + pOuterCircleBitmap = null; + } +} + +void +LockForm::UpdateDateTimeLabels(void) +{ + String date; + String time; + String amPm; + GetDateTime(date, time, amPm); + + if (__pDateLabel != null && !date.Equals(__pDateLabel->GetText(), true)) + { + Font font; + Dimension textDim(0, 0); + font.Construct(FONT_STYLE_BOLD, FONT_SIZE_DATE_LABEL); + font.GetTextExtent(date, date.GetLength(), textDim); + __pDateLabel->SetBounds(GetWidth() - (textDim.width + FONT_SIZE_AM_PM_LABEL), __pDateLabel->GetY(), textDim.width + FONT_SIZE_AM_PM_LABEL, __pDateLabel->GetHeight()); + __pDateLabel->SetText(date); + __pDateLabel->Invalidate(false); + } + + if (__pTimeLabel != null && !time.Equals(__pTimeLabel->GetText(), true)) + { + Font font; + Dimension textDim(0, 0); + font.Construct(FONT_STYLE_BOLD, FONT_SIZE_TIME_LABEL); + font.GetTextExtent(time, time.GetLength(), textDim); + __pTimeLabel->SetBounds(GetWidth() - (textDim.width + FONT_SIZE_AM_PM_LABEL), __pTimeLabel->GetY(), textDim.width + FONT_SIZE_AM_PM_LABEL, __pTimeLabel->GetHeight()); + __pTimeLabel->SetText(time); + __pTimeLabel->Invalidate(false); + + if (__pAmPmLabel != null && !amPm.Equals(__pAmPmLabel->GetText(), true)) + { + Font amPmFont; + Dimension amPmTextDim(0, 0); + amPmFont.Construct(FONT_STYLE_BOLD, FONT_SIZE_AM_PM_LABEL); + amPmFont.GetTextExtent(amPm, amPm.GetLength(), amPmTextDim); + + if (amPmTextDim.width < (W_AM_PM_LABEL - FONT_SIZE_AM_PM_LABEL)) + { + __pAmPmLabel->SetPosition(__pTimeLabel->GetX() - W_AM_PM_LABEL, __pAmPmLabel->GetY()); + } + else + { + __pAmPmLabel->SetBounds(__pTimeLabel->GetX() - (amPmTextDim.width + FONT_SIZE_AM_PM_LABEL), __pAmPmLabel->GetY(), (amPmTextDim.width + FONT_SIZE_AM_PM_LABEL), __pAmPmLabel->GetHeight()); + } + __pAmPmLabel->SetText(amPm); + __pAmPmLabel->Invalidate(false); + } + } +} + +void +LockForm::StopDrawingUpdates(void) +{ + if (__pDateTimeTimer != null) + { + __pDateTimeTimer->Cancel(); + } +} + +void +LockForm::StartDrawingUpdates(void) +{ + InitializeControls(); + UpdateDateTimeLabels(); + if (__pDateTimeTimer != null) + { + __pDateTimeTimer->Start(DATE_TIME_TIMER_DURATION); + } +} diff --git a/src/LcMainFrame.cpp b/src/LcMainFrame.cpp new file mode 100644 index 0000000..9d55353 --- /dev/null +++ b/src/LcMainFrame.cpp @@ -0,0 +1,73 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.1 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file LcMainFrame.cpp + * @brief Keeps the implementation of MainFrame for the application. + */ + +#include "LcLockForm.h" +#include "LcMainFrame.h" + +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; + +MainFrame::MainFrame(void) +{ + +} + +MainFrame::~MainFrame(void) +{ + +} + +result +MainFrame::OnInitializing(void) +{ + result r = E_SUCCESS; + + SetZOrderGroup(WINDOW_Z_ORDER_GROUP_HIGH); + + LockForm* pLockForm = new (std::nothrow) LockForm(); + TryCatch(pLockForm != null, r = E_FAILURE, "[E_OUT_OF_MEMORY] Unable to create pLockForm"); + pLockForm->Initialize(); + r = AddControl(pLockForm); + TryCatch(r == E_SUCCESS, , "AddControl(pLockForm) failed with error %s", GetErrorMessage(r)); + + r = SetCurrentForm(pLockForm); + TryCatch(r == E_SUCCESS, , "SetCurrentForm(pLockForm) failed with error %s", GetErrorMessage(r)); + + pLockForm->Invalidate(true); + + return r; + +CATCH: + + if (pLockForm != null) + { + delete pLockForm; + pLockForm = null; + } + + return r; +} + +result +MainFrame::OnTerminating(void) +{ + return E_SUCCESS; +} diff --git a/src/LcTypes.cpp b/src/LcTypes.cpp new file mode 100644 index 0000000..0d85ddf --- /dev/null +++ b/src/LcTypes.cpp @@ -0,0 +1,106 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.1 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file LcTypes.cpp + * @brief Defines the constants and the Ids used in the project + */ +#include +#include "LcTypes.h" + +using namespace Tizen::Graphics; + +const int X_DATE_LABEL = 226; +const int Y_DATE_LABEL_OFFSET = 396; +const int W_DATE_LABEL = 472; +const int H_DATE_LABEL = 40; +const int X_TIME_LABEL = 200; +const int Y_TIME_LABEL_OFFSET = 356; +const int W_TIME_LABEL = 498; +const int H_TIME_LABEL = 140; +const int X_AM_PM_LABEL = 234; +const int Y_AM_PM_LABEL_OFFSET = 263; +const int W_AM_PM_LABEL = 150; +const int H_AM_PM_LABEL = 38; +const int W_LOCK_OUTER_CIRCLE = 162; +const int H_LOCK_OUTER_CIRCLE = 162; +const int X_INNER_CIRCLE_PANEL = 24; +const int Y_INNER_CIRCLE_PANEL = 24; +const int W_INNER_CIRCLE_PANEL = 114; +const int H_INNER_CIRCLE_PANEL = 114; +const int X_LOCK = 37; +const int Y_LOCK = 37; +const int X_UNLOCK_PANEL = 578; +const int Y_UNLOCK_PANEL = 24; +const int W_UNLOCK_PANEL = 114; +const int H_UNLOCK_PANEL = 114; +const int X_UNLOCK_CIRCLE = 0; +const int Y_UNLOCK_CIRCLE = 0; +const int X_LOCK_ICON = 17; +const int Y_LOCK_ICON = 17; +const int X_MAIN_PANEL = 0; +const int Y_MAIN_PANEL_OFFSET = 216; +const int H_MAIN_PANEL = 167; +const int Y_SWIPE_LABEL = 79; +const int W_SWIPE_LABEL = 9; +const int H_SWIPE_LABEL = 9; +const int X_TOUCH_PRESSED_VALID = 138; +const int Y_TOUCH_PRESSED_VALID = 138; +const int X_OPERATOR_LABEL = 554; +const int Y_OPERATOR_LABEL = 0; +const int W_OPERATOR_LABEL = 150; +const int H_OPERATOR_LABEL = 42; +const int X_HELP_TEXT_LABEL = 0; +const int Y_HELP_TEXT_LABEL_OFFSET = 76; +const int W_HELP_TEXT_LABEL = 720; +const int H_HELP_TEXT_LABEL = 52; +const int X_MIN_OFFSET = 170; +const int X_MIN_DISTANCE = 14; +const int X_MIN_DELTA_LABELS = 87; +const int Y_LOCK_OUTER_VISUAL_ELEMENT = 1051; +const int FONT_SIZE_DATE_LABEL = 38; +const int FONT_SIZE_TIME_LABEL = 140; +const int FONT_SIZE_AM_PM_LABEL = 38; +const int DATE_TIME_TIMER_DURATION = 500; +const int COUNT_SWIPE_LABEL = 5; +const int COUNT_LOCK_IMAGES = 15; +const int DIVISION_FACTOR_FOR_COUNT = 90; +const int DURATION_FOR_LAZY_INIT = 20; +const int FONT_SIZE_HELP_TEXT = 32; + +const wchar_t* IDB_BACKGROUND = L"BG.png"; +const wchar_t* IDB_UNLOCK_CIRCLE01 = L"RB07_unlock_inner_circle.png"; +const wchar_t* IDB_UNLOCK_CIRCLE02 = L"RB07_unlock_outer_circle.png"; +const wchar_t* IDB_UNLOCK_CIRCLE03 = L"RB07_unlock_circle03.png"; +const wchar_t* UNLOCK_PRESS_BASE = L"B07_icon_Unlock_"; +const wchar_t* UNLOCK_PRESS_EXTENSION = L".png"; +const wchar_t* LOCK_WALLPAPER_KEY = L"http://tizen.org/setting/screen.wallpaper.lock"; +const wchar_t* DATE_PATTERN = L"MMM d, EEEE"; +const wchar_t* TIME_PATTERN = L"hh:mm"; +const wchar_t* TIME_PATTERN_24HR = L"HH:mm"; +const wchar_t* AMPM_PATTERN = L"a"; +const wchar_t* SETTINGS_TIME_FORMAT_IS24_KEY = L"http://tizen.org/setting/locale.time.format.24hour"; +const wchar_t* SETTINGS_TIME_FORMAT_KEY = L"http://tizen.org/setting/locale.time.format"; +const unsigned int COLOR_LABEL_TEXT = Color32<249, 249, 249, 255>::Value; +const unsigned int COLOR_VISUAL_ELEMENT = Color32<0, 0, 0, 0>::Value; +const unsigned int COLOR_HELP_TEXT_BG = Color32<0, 0, 0, 102>::Value; +const unsigned int COLOR_HELP_TEXT_SHADOW = Color32<0, 0, 0, 127>::Value; +const wchar_t* LOCK_INNER_CIRCLE_VISUAL_ELEMENT = L"LockInnerCircleVisualElement"; +const wchar_t* LOCK_OUTER_CIRCLE_VISUAL_ELEMENT = L"LockOuterCircleVisualElement"; +const wchar_t* UNLOCK_INNER_CIRCLE_VISUAL_ELEMENT = L"UnLockInnerCircleVisualElement"; +const wchar_t* LOCK_ICON_VISUAL_ELEMENT = L"LockIconVisualElement"; +const wchar_t* UNLOCK_ICON_VISUAL_ELEMENT = L"UnLockIconVisualElement"; +const wchar_t* SWIPE_VISUAL_ELEMENT_NAME_BASE = L"SwipeVisualElementNameBase";