--- /dev/null
+# 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})
--- /dev/null
+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.
+
--- /dev/null
+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.
--- /dev/null
+//
+// 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 <FApp.h>
+#include <FSystem.h>
+
+/**
+ * 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_
--- /dev/null
+//
+// 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 <FBase.h>
+#include <FSystem.h>
+#include <FUi.h>
+
+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<Tizen::Graphics::Bitmap*>* __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_
--- /dev/null
+//
+// 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 <FUi.h>
+
+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_
--- /dev/null
+//
+// 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_
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<Manifest xmlns="http://schemas.tizen.org/2012/12/manifest">
+ <Id>sgooa9p9fz</Id>
+ <Version>1.0.0</Version>
+ <Type>C++App</Type>
+ <Requirements>
+ <Feature Name="http://tizen.org/feature/platform.core.cpu.arch.x86">true</Feature>
+ <Feature Name="http://tizen.org/feature/platform.core.fpu.arch.vfpv3">true</Feature>
+ </Requirements>
+ <Apps>
+ <ApiVersion>2.1</ApiVersion>
+ <Privileges>
+ <Privilege>http://tizen.org/privilege/uimanager</Privilege>
+ <Privilege>http://tizen.org/privilege/telephony</Privilege>
+ </Privileges>
+ <UiApp LaunchingHistoryVisible="False" Main="True" MenuIconVisible="False" Name="Lock" Category="lock-screen">
+ <UiScalability BaseScreenSize="Normal" CoordinateSystem="Logical" LogicalCoordinate="720"/>
+ <UiTheme SystemTheme="White"/>
+ <DisplayNames>
+ <DisplayName Locale="eng-GB">Lock-Ref</DisplayName>
+ </DisplayNames>
+ <Icons>
+ <Icon Section="MainMenu" Type="Xhigh">mainmenu.png</Icon>
+ </Icons>
+ <LaunchConditions/>
+ </UiApp>
+ </Apps>
+</Manifest>
--- /dev/null
+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/*
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">لا توجد SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">اسحب على الشاشة لإلغاء القفل</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">SIM yoxdur</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Kilidi açmaq üçün ekranda sürüşdürün</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Няма SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Завъртете екрана, за да отключите</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Sense SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Desplaci el dit per la pantalla per desbloquejar-la</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Žádná SIM karta</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Pro odemknutí přejeďte po displeji</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Intet SIM-kort</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Stryg på skærm for at låse op</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Keine SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Zum Entsperren über Bildschirm streichen</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Δεν βρέθηκε SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Σύρετε το δάχτυλό σας στην οθόνη για ξεκλείδωμα</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">No SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Swipe screen to unlock</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">No SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Sweep screen to unlock</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">No SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Sweep screen to unlock</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">SIM-i pole</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Avamiseks libistage sõrme üle ekraani</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Ez dago SIM txartelik</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Arrastatu pantaila desblokeatzeko</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Ei SIM-korttia</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Avaa pyyhkäisemällä näyttöä</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Pas de carte SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Glissez un doigt sur l'écran pour déverrouiller</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Pas de carte SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Faites glisser votre doigt sur l'écran pour déverrouiller</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Níl SIM ann</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Svaidhpeáil an scáileán lena díghlasáil</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Non hai SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Move a pantalla para desbloquealo</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">कोई SIM नहीं</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">अनलॉक करने के लिए स्क्रीन स्विप करें</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Nema SIM-a</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Kliznite po zaslonu za otključavanje</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Nincs SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">A feloldáshoz húzza végig az ujját a kijelzőn</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">SIM չկա</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Մաքրել էկրանը՝ արգելաբացելու համար</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Ekkert SIM-kort</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Renndu fingrinum yfir skjáinn til að opna</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Nessuna SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Trascina il dito sul display per sbloccare</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">SIM未挿入</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">画面をスイープして、ロックを解除</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">SIM არაა</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">გადაუსვით ეკრანზე და განიბლოკება</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">SIM жоқ</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Құлпын ашу үшін экранды сүртіңіз</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">SIM이 없습니다</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">해제하려면 화면을 움직이세요</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Nav SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Slidiniet, lai atbloķētu</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Nėra SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Perbraukite per ekraną ir atrakinkite</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Нема SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Поминете по екранот за отклучување</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Geen SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Veeg over scherm om te ontgrendelen</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Mangler SIM-kort</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Stryk på skjermen for å låse opp</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Brak karty SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Przesuń palcem po ekranie, aby odblokować</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Sem Cartão SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Deslize a tela para desbloquear</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Sem SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Passar dedo no ecrã para desbloquear</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Fără SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Glisaţi pe ecran pentru a debloca</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Нет SIM-карты</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Проведите по экрану</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="3.0.0.201212201745" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_LOCK_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" orientation="Portrait" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_INDICATOR" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_INDICATOR" type="LAYOUT_RELATIVE"/>
+ </Form>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Žiadna SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Odomknite prejdením po displeji</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Ni SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Za odklep potegnite po zaslonu</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">No hay SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Arrastre el dedo por la pantalla para desbloquear</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">No hay tarjeta SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Deslice el dedo para desbloquear</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Nema SIM kartice</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Za otključavanje prevuci prstom preko ekrana</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Inget SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Svep över skärmen för att låsa upp</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">SIM yok</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Açmak için ekrana dokun</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">Немає SIM</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Проведіть по екрану, щоб його розблокувати</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">SIM-karta yo‘q</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">Blokdan chiqarish uchun ekran ustida barmog‘ingizni suring</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">无 SIM 卡</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">滑动屏幕解锁</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">無 SIM 卡</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">掃動屏幕以解鎖</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">无 SIM 卡</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">滑动屏幕解锁</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+--><string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+ <text id="IDS_COM_BODY_NO_SIM">無 SIM 卡</text>
+ <text id="IDS_IDLE_BODY_SWEEP_SCREEN_TO_UNLOCK">滑動螢幕以解鎖</text>
+</string_table>
--- /dev/null
+//
+// 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<LockForm*>(GetAppFrame()->GetFrame()->GetCurrentForm());
+
+ if (pLockForm != null)
+ {
+ pLockForm->StopDrawingUpdates();
+ }
+}
+
+void
+LockApp::OnBatteryLevelChanged(BatteryLevel batteryLevel)
+{
+
+}
+
+void
+LockApp::OnForeground(void)
+{
+ LockForm* pLockForm = static_cast<LockForm*>(GetAppFrame()->GetFrame()->GetCurrentForm());
+
+ if (pLockForm != null)
+ {
+ pLockForm->StartDrawingUpdates();
+ }
+}
+
+void
+LockApp::OnLowMemory(void)
+{
+
+}
+
+void
+LockApp::OnScreenOff(void)
+{
+ LockForm* pLockForm = static_cast<LockForm*>(GetAppFrame()->GetFrame()->GetCurrentForm());
+
+ if (pLockForm != null)
+ {
+ pLockForm->StopDrawingUpdates();
+ }
+}
+
+void
+LockApp::OnScreenOn(void)
+{
+ LockForm* pLockForm = static_cast<LockForm*>(GetAppFrame()->GetFrame()->GetCurrentForm());
+
+ if (pLockForm != null)
+ {
+ pLockForm->StartDrawingUpdates();
+ }
+}
--- /dev/null
+//
+// 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<int>(r);
+}
+#ifdef __cplusplus
+}
+#endif // __cplusplus
--- /dev/null
+//
+// 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 <FApp.h>
+#include <FGraphics.h>
+#include <FIo.h>
+#include <FLocales.h>
+#include <FMedia.h>
+#include <FSystem.h>
+#include <FTelephony.h>
+#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<Bitmap*>();
+ __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<Label*>(__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<Label*>(__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<Label*>(__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<Label*>(__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<Label*>(__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<Label*>(__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);
+ }
+}
--- /dev/null
+//
+// 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;
+}
--- /dev/null
+//
+// 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 <FGraphics.h>
+#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";