From: Jinkun Jang Date: Tue, 12 Mar 2013 16:38:56 +0000 (+0900) Subject: Tizen 2.1 base X-Git-Tag: accepted/tizen_2.1/20130425.023641~72 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=83da4a6c0cbbc131980b39b0f232b112cf59c57f;p=apps%2Fosp%2FImageViewer.git Tizen 2.1 base --- diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..1904234 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,32 @@ +# Target name and PKGID +## TODO : set application name and ID +SET(this_target ImageViewer) +SET(PKGID jysyv9o1dc) + +# 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-content osp-image osp-social 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 100644 index 0000000..9c95663 --- /dev/null +++ b/LICENSE.Flora @@ -0,0 +1,206 @@ +Flora License + +Version 1.0, May, 2012 + +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 Compatibility Definition Document +and passes the Compatibility Test Suite as defined from time to time +by the Tizen Technical Steering Group and certified by the Tizen +Association or its designated agent. + +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. + +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.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://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 100644 index 0000000..9ec42be --- /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. +Please, see the LICENSE.Flora file for Flora License, Version 1 terms and conditions. \ No newline at end of file diff --git a/inc/IvBaseForm.h b/inc/IvBaseForm.h new file mode 100644 index 0000000..c455e33 --- /dev/null +++ b/inc/IvBaseForm.h @@ -0,0 +1,30 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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. +// + +#include + +#ifndef _IV_BASE_FORM_H_ +#define _IV_BASE_FORM_H_ + +class BaseForm + : public Tizen::Ui::Controls::Form +{ +public: + virtual ~BaseForm(void){}; + virtual void OnUpdateContentList(void){}; +}; + +#endif /* _IV_BASE_FORM_H_ */ diff --git a/inc/IvCommonUtil.h b/inc/IvCommonUtil.h new file mode 100644 index 0000000..5509585 --- /dev/null +++ b/inc/IvCommonUtil.h @@ -0,0 +1,36 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IVCommonUtil.h + * @brief This is the header file for CommonUtil class. + */ + +#ifndef _IV_COMMON_UTIL_H_ +#define _IV_COMMON_UTIL_H_ + +#include +#include +#include "IvTypes.h" + +class CommonUtil +{ +public: + static ImageViewerMediaType GetMediaType(const Tizen::Base::String& filePath); + static Tizen::Graphics::Bitmap* CloneBitmapN(const Tizen::Graphics::Bitmap& bitmap); +}; + +#endif /* _IV_COMMON_UTIL_H_ */ diff --git a/inc/IvFormFactory.h b/inc/IvFormFactory.h new file mode 100644 index 0000000..928e84f --- /dev/null +++ b/inc/IvFormFactory.h @@ -0,0 +1,40 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvFormFactory.h + * @brief This is the header file for FormFactory class. + */ + +#ifndef _IV_FORM_FACTORY_H_ +#define _IV_FORM_FACTORY_H_ + +#include +#include +#include "IvTypes.h" + +class FormFactory + : public Tizen::Ui::Scenes::IFormFactory +{ +public: + FormFactory(void); + virtual ~FormFactory(void); + + virtual Tizen::Ui::Controls::Form* CreateFormN(const Tizen::Base::String& formId, + const Tizen::Ui::Scenes::SceneId& sceneId); +}; + +#endif /* _IV_IMAGE_VIEWER_FORM_FACTORY_H_ */ diff --git a/inc/IvImageEvent.h b/inc/IvImageEvent.h new file mode 100644 index 0000000..8368c1e --- /dev/null +++ b/inc/IvImageEvent.h @@ -0,0 +1,40 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageEvent.h + * @brief This is the header file for ImageEvent class. + */ + +#ifndef _IV_IMAGE_EVENT_H_ +#define _IV_IMAGE_EVENT_H_ + +#include + +class pImageProviderEventListener; + +class ImageEvent + : public Tizen::Base::Runtime::Event +{ +public: + virtual ~ImageEvent(void); + +protected: + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, + const Tizen::Base::Runtime::IEventArg& eventArg); +}; + +#endif /* _IV_IMAGE_EVENT_H_ */ diff --git a/inc/IvImageEventArg.h b/inc/IvImageEventArg.h new file mode 100644 index 0000000..9d1a6e5 --- /dev/null +++ b/inc/IvImageEventArg.h @@ -0,0 +1,42 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageEventArg.h + * @brief This is the header file for ImageEventArg class. + */ + +#ifndef _IV_IMAGE_EVENT_ARG_H_ +#define _IV_IMAGE_EVENT_ARG_H_ + +#include + +class ImageEventArg + : public Tizen::Base::Runtime::IEventArg +{ +public: + ImageEventArg(const Tizen::Base::String& filePath, Tizen::Graphics::Bitmap* pBitmap); + virtual ~ImageEventArg(void); + + Tizen::Base::String GetFilePath(void) const; + Tizen::Graphics::Bitmap* GetBitmapN(void) const; + +protected: + Tizen::Base::String __filePath; + Tizen::Graphics::Bitmap* __pBitmap; +}; + +#endif /* _IV_IMAGE_EVENT_ARG_H_ */ diff --git a/inc/IvImageInfo.h b/inc/IvImageInfo.h new file mode 100644 index 0000000..a9ca0c8 --- /dev/null +++ b/inc/IvImageInfo.h @@ -0,0 +1,48 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageInfo.h + * @brief This is the header file for AlbumInfo class. + */ + +#ifndef _IV_IMAGE_INFO_H_ +#define _IV_IMAGE_INFO_H_ + +#include +#include + +class ImageInfo + : public Tizen::Base::Object +{ +public: + ImageInfo(void); + virtual ~ImageInfo(void); + + void Construct(Tizen::Base::String& pFilePath, Tizen::Graphics::Bitmap* pBitmap); + + Tizen::Base::String GetFilePath(void) const; + void SetFilePath(const Tizen::Base::String& filePath); + Tizen::Graphics::Bitmap* GetBitmapN(void) const; + void SetBitmap(Tizen::Graphics::Bitmap* pBitmap); + void ClearBitmap(void); + +protected : + Tizen::Base::String __pFilePath; + Tizen::Graphics::Bitmap* __pBitmap; +}; + +#endif /* _IV_IMAGE_INFO_H_ */ diff --git a/inc/IvImageJob.h b/inc/IvImageJob.h new file mode 100644 index 0000000..f60504e --- /dev/null +++ b/inc/IvImageJob.h @@ -0,0 +1,53 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageJob.h + * @brief This is the header file for ImageJob class. + */ + +#ifndef _IV_IMAGE_JOB_H_ +#define _IV_IMAGE_JOB_H_ + +#include + +class ImageEvent; + +class ImageJob + : public Tizen::Base::Object +{ +public: + ImageJob(void); + virtual ~ImageJob(void); + + void Construct(const Tizen::Base::String& filePath, const unsigned long requestId, + const ImageEvent* pRequestEvent); + + Tizen::Base::String GetFilePath(void) const; + unsigned long GetRequestId() const; + const ImageEvent* GetEvent(void) const; + +private: + ImageJob(const ImageJob&); + ImageJob& operator=(const ImageJob&); + +private: + Tizen::Base::String __filePath; + unsigned long __requestId; + const ImageEvent* __pRequestEvent; +}; + +#endif /* _IV_IMAGE_JOB_H_ */ diff --git a/inc/IvImageNameEditorForm.h b/inc/IvImageNameEditorForm.h new file mode 100644 index 0000000..e0fc072 --- /dev/null +++ b/inc/IvImageNameEditorForm.h @@ -0,0 +1,73 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageNameEditorForm.h + * @brief This is the header file for ImageNameEditorForm class. + */ + +#ifndef _IV_IMAGE_NAME_EDITOR_FORM_H_ +#define _IV_IMAGE_NAME_EDITOR_FORM_H_ + +#include +#include +#include +#include +#include "IvImageViewerPresentationModel.h" + +class ImageNameEditorForm + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::Controls::IFormBackEventListener + , public Tizen::Ui::IActionEventListener + , public Tizen::Ui::IOrientationEventListener + , public Tizen::Ui::ITextEventListener + , public Tizen::Ui::Scenes::ISceneEventListener +{ +public: + ImageNameEditorForm(void); + virtual ~ImageNameEditorForm(void); + + result Initialize(void); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source); + + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + virtual void OnOrientationChanged(const Tizen::Ui::Control &source, + Tizen::Ui::OrientationStatus orientationStatus); + + virtual void OnTextValueChangeCanceled (const Tizen::Ui::Control &source); + virtual void OnTextValueChanged (const Tizen::Ui::Control &source); + + virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, + const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs); + virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, + const Tizen::Ui::Scenes::SceneId& nextSceneId); + +private: + int __currentIndex; + Tizen::Ui::Controls::EditField* __pNameEditField; + Tizen::Base::String __nameEditFieldText; + Tizen::Base::String __nameEditFieldPreText; + Tizen::Base::String __nameEditFieldTempText; + Tizen::Ui::Controls::MessageBox* __pMessageBox; + ImageViewerPresentationModel* __pPresentationModel; +}; + +#endif /* _IV_IMAGE_NAME_EDITOR_FORM_H_ */ diff --git a/inc/IvImageProvider.h b/inc/IvImageProvider.h new file mode 100644 index 0000000..e162352 --- /dev/null +++ b/inc/IvImageProvider.h @@ -0,0 +1,68 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageProvider.h + * @brief This is the header file for ImageProvider class. + */ + +#ifndef _IV_IMAGE_PROVIDER_H_ +#define _IV_IMAGE_PROVIDER_H_ + +#include +#include + +class ImageEvent; + +class ImageProvider + : public Tizen::Base::Runtime::EventDrivenThread +{ +public: + static ImageProvider* GetInstance(void); + +public: + static void Release(void); + + void RequestImage(const Tizen::Base::String& filePath, const ImageEvent* event); + void ClearImageRequests(bool appTerminating = false); + + virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList * pArgs); + virtual bool OnStart(void); + virtual void OnStop(void); + +private: + ImageProvider(void); + virtual ~ImageProvider(void); + ImageProvider(ImageProvider& value); + ImageProvider& operator=(ImageProvider&); + + result Construct(void); + static void CreateInstance(void); + static void DestroyInstance(void); + + Tizen::Graphics::Bitmap* GetImageByDecodeN(const Tizen::Base::String& filePath) const; + +private: + static ImageProvider* __pImageProviderInstance; + static Tizen::Base::Collection::ArrayList* __pImageEventListener; + + Tizen::Base::Runtime::Mutex* __pMutexCmd; + Tizen::Base::Collection::ArrayList* __pCmdQueue; + unsigned long __requestId; + bool __appTerminating; +}; + +#endif /* _IV_IMAGE_PROVIDER_H_ */ diff --git a/inc/IvImageProviderEventListener.h b/inc/IvImageProviderEventListener.h new file mode 100644 index 0000000..0f1d1e7 --- /dev/null +++ b/inc/IvImageProviderEventListener.h @@ -0,0 +1,35 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageProviderEventListener.h + * @brief This is the header file for ImageProviderEventListener class. + */ + +#ifndef _IV_IMAGE_PROVIDER_EVENT_LISTENER_H_ +#define _IV_IMAGE_PROVIDER_EVENT_LISTENER_H_ + +#include + +class IImageProviderEventListener + : public Tizen::Base::Runtime::IEventListener +{ +public: + virtual ~IImageProviderEventListener(void) {}; + virtual void OnImageReceivedN(Tizen::Base::Runtime::IEventArg& eventArg) = 0; +}; + +#endif /* _IV_IMAGE_PROVIDER_EVENT_LISTENER_H_ */ diff --git a/inc/IvImageSetterForm.h b/inc/IvImageSetterForm.h new file mode 100644 index 0000000..7b1c7dd --- /dev/null +++ b/inc/IvImageSetterForm.h @@ -0,0 +1,88 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageSetterForm.h + * @brief This is the header file for ImageSetterForm class. + */ + +#ifndef _IV_IMAGE_SETTER_FORM_H_ +#define _IV_IMAGE_SETTER_FORM_H_ + +#include +#include +#include +#include +#include +#include + +class ImageViewerPresentationModel; + +class ImageSetterForm + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener + , public Tizen::Ui::IOrientationEventListener + , public Tizen::Ui::Controls::IFormBackEventListener + , public Tizen::Ui::Controls::IGalleryEventListener + , public Tizen::Ui::Controls::IGalleryItemProvider + , public Tizen::Ui::Scenes::ISceneEventListener +{ +public: + ImageSetterForm(); + virtual ~ImageSetterForm(); + + result Initialize(void); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + virtual void OnOrientationChanged(const Tizen::Ui::Control &source, + Tizen::Ui::OrientationStatus orientationStatus); + + virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source); + + virtual void OnGalleryCurrentItemChanged (Tizen::Ui::Controls::Gallery &view, int index); + virtual void OnGalleryItemClicked(Tizen::Ui::Controls::Gallery& listView, int index); + virtual void OnGallerySlideShowStarted(Tizen::Ui::Controls::Gallery& gallery); + virtual void OnGallerySlideShowStopped(Tizen::Ui::Controls::Gallery& gallery); + + virtual Tizen::Ui::Controls::GalleryItem* CreateItem(int index); + virtual bool DeleteItem(int index, Tizen::Ui::Controls::GalleryItem* pItem); + virtual int GetItemCount(void); + + virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, + const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs); + virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, + const Tizen::Ui::Scenes::SceneId& nextSceneId); + +private: + result InitializeButton(void); + void CreateGallery(void); + +private: + Tizen::Ui::Controls::Button* __pSetButton; + Tizen::Ui::Controls::Button* __pCancelButton; + Tizen::Ui::Controls::Gallery* __pGallery; + int __statusValue; + int __currentImageIndex; + long long __contentId; + Tizen::Graphics::Bitmap* __currentBitmap; + ImageViewerPresentationModel* __pPresentationModel; +}; + +#endif /* _IV_IMAGE_SETTER_FORM_H_ */ diff --git a/inc/IvImageViewerApp.h b/inc/IvImageViewerApp.h new file mode 100644 index 0000000..0f0b4ad --- /dev/null +++ b/inc/IvImageViewerApp.h @@ -0,0 +1,65 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageViewerApp.h + * @brief This is the header file for ImageViewerApp class. + */ + +#ifndef _IV_IMAGE_VIEWER_APP_H_ +#define _IV_IMAGE_VIEWER_APP_H_ + +#include +#include +#include + +class ImageViewerApp + : public Tizen::App::UiApp + , public Tizen::App::IAppControlProviderEventListener + , public Tizen::System::ISettingEventListener +{ +public: + ImageViewerApp(void); + virtual~ImageViewerApp(void); + + static Tizen::App::UiApp* CreateInstance(void); + + Tizen::Base::String GetAppControlOperationId(void) const; + Tizen::Base::String GetUriData(void) const; + const Tizen::Base::Collection::IMap* GetAppControlArguments(void) const; + + virtual bool OnAppInitializing(Tizen::App::AppRegistry& appRegistry); + virtual bool OnAppInitialized(void); + virtual bool OnAppTerminating(Tizen::App::AppRegistry& appRegistry, bool forcedTermination = false); + virtual void OnForeground(void); + + virtual void OnAppControlRequestReceived(RequestId reqId, const Tizen::Base::String& operationId, + const Tizen::Base::String* pUriData, const Tizen::Base::String* pMimeType, + const Tizen::Base::Collection::IMap* pExtraData); + + virtual void OnSettingChanged(Tizen::Base::String& key); + + void SetFrameEnabled(bool enabled); + +private: + RequestId __requestId; + Tizen::Base::String __operationId; + Tizen::Base::String __uriData; + Tizen::App::AppCtrlResult __appControlResult; + const Tizen::Base::Collection::HashMap* __pArguments; +}; + +#endif /* _IV_IMAGE_VIEWER_APP_H_ */ diff --git a/inc/IvImageViewerEventListener.h b/inc/IvImageViewerEventListener.h new file mode 100644 index 0000000..0ca0294 --- /dev/null +++ b/inc/IvImageViewerEventListener.h @@ -0,0 +1,37 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageViewerEventListener.h + * @brief This is the header file for IImageViewerEventListener class. + */ + +#ifndef _IV_IMAGE_VIEWER_EVENT_LISTENER_H_ +#define _IV_IMAGE_VIEWER_EVENT_LISTENER_H_ + +#include + +class ImageInfo; + +class IImageViewerEventListener + : public Tizen::Base::Object +{ +public: + virtual ~IImageViewerEventListener(void) {}; + virtual void OnImageDecodedN(const int index) = 0; +}; + +#endif /* _IV_IMAGE_VIEWER_EVENT_LISTENER_H_ */ diff --git a/inc/IvImageViewerForm.h b/inc/IvImageViewerForm.h new file mode 100644 index 0000000..9851050 --- /dev/null +++ b/inc/IvImageViewerForm.h @@ -0,0 +1,178 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageViewerForm.h + * @brief This is the header file for ImageViewerForm class. + */ + +#ifndef _IV_IMAGE_VIEWER_FORM_H_ +#define _IV_IMAGE_VIEWER_FORM_H_ + +#include +#include +#include +#include +#include +#include +#include +#include "IvBaseForm.h" +#include "IvImageProvider.h" +#include "IvTypes.h" +#include "IvImageViewerEventListener.h" + +class ImageInfo; +class ImageViewerForm; +class ImageViewerPresentationModel; + +class ImageViewerForm + : public BaseForm + , public Tizen::App::IAppControlResponseListener + , public Tizen::Base::Runtime::ITimerEventListener + , public Tizen::Content::IContentTransferListener + , public Tizen::Media::IImageDecodeUrlEventListener + , public Tizen::Ui::IActionEventListener + , public Tizen::Ui::IOrientationEventListener + , public Tizen::Ui::IScrollPanelEventListener + , public Tizen::Ui::Controls::IFormBackEventListener + , public Tizen::Ui::Controls::IGalleryEventListener + , public Tizen::Ui::Controls::IGalleryItemProvider + , public Tizen::Ui::Scenes::ISceneEventListener + , public IImageViewerEventListener +{ +public: + ImageViewerForm(void); + virtual ~ImageViewerForm(void); + + result Initialize(); + + virtual result OnInitializing(void); + virtual result OnInitialized(void); + virtual result OnTerminating(void); + virtual void OnUpdateContentList(void); + + virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId, + const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult, + const Tizen::Base::Collection::IMap* pExtraData); + + virtual void OnTimerExpired(Tizen::Base::Runtime::Timer &timer); + + virtual void OnContentTransferInProgress(RequestId requestID, int totalReceivedSize); + virtual void OnContentUploadCompleted(RequestId requestID, result res, + const Tizen::Base::String& errorCode, + const Tizen::Base::String& errorMessage); + virtual void OnContentDownloadCompleted(RequestId requestID, Tizen::Content::ContentId contentID, result res, + const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMessage); + virtual void OnContentDownloadToBufferCompleted(RequestId reqId, Tizen::Base::ByteBuffer* pBuffer, result r, + const Tizen::Base::String& errorCode, const Tizen::Base::String& errorMessage); + virtual void OnContentTransferCanceled(RequestId reqId, result res, const Tizen::Base::String& errorCode, + const Tizen::Base::String& errorMessage); + + virtual void OnImageDecodeUrlReceived (RequestId reqId, Tizen::Graphics::Bitmap *pBitmap, + result r, const Tizen::Base::String errorCode, const Tizen::Base::String errorMessage); + + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + virtual void OnOrientationChanged(const Tizen::Ui::Control &source, Tizen::Ui::OrientationStatus orientationStatus); + + virtual void OnOverlayControlCreated(const Tizen::Ui::Control& source); + virtual void OnOverlayControlOpened(const Tizen::Ui::Control& source); + virtual void OnOverlayControlClosed(const Tizen::Ui::Control& source); + virtual void OnOtherControlSelected(const Tizen::Ui::Control& source); + + virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source); + + virtual void OnGalleryCurrentItemChanged (Tizen::Ui::Controls::Gallery &view, int index); + virtual void OnGalleryItemClicked(Tizen::Ui::Controls::Gallery& listView, int index); + virtual void OnGallerySlideShowStarted(Tizen::Ui::Controls::Gallery& gallery); + virtual void OnGallerySlideShowStopped(Tizen::Ui::Controls::Gallery& gallery); + + virtual Tizen::Ui::Controls::GalleryItem* CreateItem(int index); + virtual bool DeleteItem(int index, Tizen::Ui::Controls::GalleryItem* pItem); + virtual int GetItemCount(void); + + virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, + const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs); + virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, + const Tizen::Ui::Scenes::SceneId& nextSceneId); + + virtual void OnImageDecodedN(const int index); + +private: + enum AppControlMode + { + APPCONTROL_MODE_NORMAL = 0 + , APPCONTROL_MODE_WEB_LINK + , APPCONTROL_MODE_CROP + , APPCONTROL_MODE_EMAIL + }; + + void InitializeDisplay(AppControlMode status); + void InitShowGallery(void); + void CreateGallery(void); + result InitializePanelDetail(void); + result SetDetailInfo(void); + result InitializePopup(void); + + result InitializeContextMenuMore(void); + result InitializeContextMenuCopy(void); + result InitializeContextMenuSetAs(void); + result InitializeContextMenuShare(void); + + result InitializeSliderPanel(void); + result ShowPanelDetail(bool showStatus); + result ChangeFooterItem(bool isChanged, Tizen::Ui::Controls::Footer* pFooter, int position); + long long GetFileSize(Tizen::Base::String filePath); + void GetHeaderString(int index, Tizen::Base::String &fileName, Tizen::Base::String &page); + void DownloadFile(void); + void CallVideoPlayer(void); + result DeleteImageFile(void); + void RequestDecodeUrl(void); + void OnRequestEmailAction(void); + + void SetFooterItemState(bool isEnable); + Tizen::Graphics::Bitmap* GetQuickThumbnailN(Tizen::Base::String& fileName); + +private: + AppControlMode __initializeDisplayModeCurrent; + Tizen::Ui::Controls::Header* __pHeader; + Tizen::Ui::Controls::Footer* __pFooter; + Tizen::Ui::Controls::ScrollPanel* __pScrollPanel; + Tizen::Ui::Controls::Label* __pDetail_Label; + Tizen::Ui::Controls::Label* __pDetail_FileInfo_Label[9]; + Tizen::Ui::Controls::Label* __pDetail_FileInfo_Value_Label[9]; + Tizen::Ui::Controls::Label *__pLabelMessage; + Tizen::Ui::Controls::Button* __pPlayButton; + Tizen::Ui::Controls::Button* __pRenameButton; + Tizen::Ui::Controls::FooterItem* __pDetailFooterItem; + Tizen::Ui::Controls::Gallery* __pGallery; + Tizen::Base::Runtime::Timer* __pTimer; + Tizen::Graphics::Bitmap* __pDecodeBitmap; + Tizen::Ui::Controls::ContextMenu* __pContextMenuMore; + Tizen::Ui::Controls::ContextMenu* __pContextMenuCopy; + Tizen::Ui::Controls::ContextMenu* __pContextMenuSetAs; + Tizen::Ui::Controls::ContextMenu* __pContextMenuShare; + Tizen::Ui::Controls::Popup* __pDeletePopup; + bool __visible; + bool __detail; + bool __startSlide; + Tizen::Base::String __downLordFileName; + RequestId __requestId; + Tizen::Content::ContentTransfer __contentTransfer; + ImageViewerPresentationModel* __pPresentationModel; +}; + +#endif /* _IV_IMAGE_VIEWER_FORM_H_ */ diff --git a/inc/IvImageViewerPresentationModel.h b/inc/IvImageViewerPresentationModel.h new file mode 100644 index 0000000..62ed8c1 --- /dev/null +++ b/inc/IvImageViewerPresentationModel.h @@ -0,0 +1,105 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageViewerPresentationModel.h + * @brief This is the header file for ImageViewerPresentationModel class. + */ + +#ifndef _IV_VIEWER_PRESENTATION_MODEL_H_ +#define _IV_VIEWER_PRESENTATION_MODEL_H_ + +#include +#include +#include +#include +#include +#include +#include +#include "IvImageProviderEventListener.h" +#include "IvTypes.h" + +class ImageEvent; +class ImageInfo; +class ImageProvider; +class IImageViewerEventListener; +class SettingPresentationModel; + +class ImageViewerPresentationModel + : public IImageProviderEventListener +{ +public: + static ImageViewerPresentationModel* GetInstance(); + +public: + result AddListener(IImageViewerEventListener* listener); + result RemoveListener(IImageViewerEventListener& listner); + + void ClearImageRequests(bool appTerminating = false); + void DeleteFilePathAt(const int index); + void UpdateFilePathAt(const int index, const Tizen::Base::String& filePath); + Tizen::Base::String GetFilePathAt(const int index) const; + Tizen::Base::Collection::ArrayList* GetImageCache() const; + ImageInfo* GetImageCacheAt(const int index) const; + + int GetFileCount(void) const; + Tizen::Base::String GetType(void) const; + int GetStartIndex(void) const; + + Tizen::Base::String GetFileName(const Tizen::Base::String& filePath, bool checkExe = false) const; + void RequestImage(const Tizen::Base::String& filePath) const; + Tizen::Content::ContentId GetFileContentId(const Tizen::Base::String& filePath) const; + + int GetSetterIndex(void) const; + void SetSetterIndex(const int index); + + int GetDurationOfSlideShow(void) const; + SlideShowTransitionEffect GetTransitionEffectOfSlideShow(void) const; + + result StartAppControl(const Tizen::Base::String& providerId, const Tizen::Base::String& operationId, + const Tizen::Base::Collection::HashMap* pDataList, + Tizen::App::IAppControlResponseListener* pListener); + + virtual void OnImageReceivedN(Tizen::Base::Runtime::IEventArg& eventArg); + +private: + ImageViewerPresentationModel(void); + ImageViewerPresentationModel(const ImageViewerPresentationModel&); + virtual ~ImageViewerPresentationModel(void); + ImageViewerPresentationModel& operator=(const ImageViewerPresentationModel&); + + result Construct(void); + static void CreateInstance(void); + static void DestroyInstance(void); + + void LoadSettingValue(); + +private: + static ImageViewerPresentationModel* __pPresentationModelInstance; + static ImageProvider* __pImageProvider; + static ImageEvent* __pImageEvent; + static Tizen::Base::Collection::ArrayList* __pImageViewerListener; + Tizen::Base::Collection::ArrayList* __pImageCaches; + long long __contactId; + int __startIndex; + int __setterIndex; + Tizen::Base::String __type; + int __durationOfSlideShow; + SlideShowTransitionEffect __transitionEffectOfSlideShow; + SettingPresentationModel* __pSettingPresentationModel; +}; + +#endif /* _IV_VIEWER_PRESENTATION_MODEL_H_ */ diff --git a/inc/IvMainFrame.h b/inc/IvMainFrame.h new file mode 100644 index 0000000..17ca0d6 --- /dev/null +++ b/inc/IvMainFrame.h @@ -0,0 +1,38 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvMainFrame.h + * @brief This is the header file for MainFrame class. + */ + +#ifndef _IV_MAIN_FRAME_H_ +#define _IV_MAIN_FRAME_H_ + +#include + +class MainFrame + : public Tizen::Ui::Controls::Frame +{ +public: + MainFrame(void); + virtual ~MainFrame(void); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); +}; + +#endif /* _IV_MAIN_FRAME_H_ */ diff --git a/inc/IvResourceManager.h b/inc/IvResourceManager.h new file mode 100644 index 0000000..a7740dc --- /dev/null +++ b/inc/IvResourceManager.h @@ -0,0 +1,39 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvResourceManager.h + * @brief This is the header file for ResourceManager class. + */ + +#ifndef _IV_RESOURCE_MANAGER_H_ +#define _IV_RESOURCE_MANAGER_H_ + +#include +#include + +class ResourceManager +{ +public: + static Tizen::Graphics::Bitmap* GetBitmapN(const Tizen::Base::String& id); + static Tizen::Base::String GetString(const Tizen::Base::String& id); + +private: + ResourceManager(void); + virtual ~ResourceManager(void); +}; + +#endif /* _IV_RESOURCE_MANAGER_H_ */ diff --git a/inc/IvSettingPresentationModel.h b/inc/IvSettingPresentationModel.h new file mode 100644 index 0000000..4502778 --- /dev/null +++ b/inc/IvSettingPresentationModel.h @@ -0,0 +1,57 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvSettingPresentationModel.h + * @brief This is the header file for SettingPresentationModel class. + */ + +#ifndef _IV_SETTING_PRESENTATION_MODEL_H_ +#define _IV_SETTING_PRESENTATION_MODEL_H_ + +#include +#include + +class SettingPresentationModel +{ +public: + static SettingPresentationModel* GetInstance(void); + +public: + result GetValue(const Tizen::Base::String& strSectionName, const Tizen::Base::String& entryName, + int& value) const; + result GetValue(const Tizen::Base::String& strSectionName, const Tizen::Base::String& entryName, + Tizen::Base::String& value) const; + +private: + SettingPresentationModel(void); + virtual ~SettingPresentationModel(void); + SettingPresentationModel(SettingPresentationModel& value); + SettingPresentationModel& operator = (SettingPresentationModel&); + + result Construct(void); + static void CreateInstance(void); + static void DestroyInstance(void); + + result CreateDefaultRegistry(void); + +private: + static SettingPresentationModel* __pPresentationModelInstance; + Tizen::Io::Registry* __pDefaultGalleryRegistry; + Tizen::Io::Registry* __pAppGalleryRegistry; +}; + +#endif /* _IV_SETTING_PRESENTATION_MODEL_H_ */ diff --git a/inc/IvTypes.h b/inc/IvTypes.h new file mode 100644 index 0000000..dca4780 --- /dev/null +++ b/inc/IvTypes.h @@ -0,0 +1,171 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvTypes.h + * @brief This is the header file for Types definition. + */ + +#ifndef _IV_TYPES_H_ +#define _IV_TYPES_H_ + +enum ImageViewerMediaType +{ + IMAGE_VIEWER_MEDIA_TYPE_IMAGE, + IMAGE_VIEWER_MEDIA_TYPE_VIDEO, + IMAGE_VIEWER_MEDIA_TYPE_OTHER, +}; + +enum SetterPressedStatus +{ + SET_AT_TYPE_HOME_SCREEN_WALLPAPER = 1 + , SET_AT_TYPE_CALLER_IMAGE + , SET_AT_TYPE_LOCK_SCREEN_WALLPAPER +}; + +enum ActionID +{ + ACTION_ID_FORM_IMAGE = 101 + , ACTION_ID_BUTTON_EDITFIELD_CANCEL = 201 + , ACTION_ID_BUTTON_EDITFIELD_DONE = 202 + , ACTION_ID_CONTEXTMENU_CALLER = 301 + , ACTION_ID_CONTEXTMENU_COPY = 302 + , ACTION_ID_CONTEXTMENU_EMAIL = 303 + , ACTION_ID_CONTEXTMENU_HOME = 304 + , ACTION_ID_CONTEXTMENU_LOCK = 305 + , ACTION_ID_CONTEXTMENU_SET_AS = 306 + , ACTION_ID_CONTORL_BUTTON_PLAY = 307 + , ACTION_ID_DELETE_POPUP_CANCEL = 401 + , ACTION_ID_DELETE_POPUP_DEL = 402 + , ACTION_ID_FOOTER_BUTTON_BACK = 403 + , ACTION_ID_FOOTER_BUTTON_DOWNLOAD = 404 + , ACTION_ID_FOOTER_BUTTON_DELETE = 405 + , ACTION_ID_FOOTER_BUTTON_DETAILS = 406 + , ACTION_ID_FOOTER_BUTTON_SLIDE = 407 + , ACTION_ID_FOOTER_BUTTON_SHARE = 408 + , ACTION_ID_FOOTER_BUTTON_SAVE = 409 + , ACTION_ID_FOOTER_MORE = 501 + , ACTION_ID_PANEL_HEADER_DETAILS_RENAME = 601 +}; + +enum SlideShowTransitionEffect +{ + SLIDE_SHOW_TRANSITION_EFFECT_SLIDE, + SLIDE_SHOW_TRANSITION_EFFECT_PAGE, + SLIDE_SHOW_TRANSITION_EFFECT_DISSOLVE, + SLIDE_SHOW_TRANSITION_EFFECT_ZOOM +}; + +extern const wchar_t* FORM_IMAGE_VIEWER; +extern const wchar_t* FORM_IMAGE_SETTER; +extern const wchar_t* FORM_IMAGE_NAME_EDITOR; + +extern const wchar_t* IDSCN_IMAGE_VIEWER; +extern const wchar_t* IDSCN_IMAGE_SETTER; +extern const wchar_t* IDSCN_IMAGE_NAME_EDITOR; + +extern const wchar_t* APPCONTROL_PROVIDER_ID_MESSAGE; +extern const wchar_t* APPCONTROL_PROVIDER_ID_EMAIL; +extern const wchar_t* APPCONTROL_PROVIDER_ID_CONTACTS; +extern const wchar_t* APPCONTROL_PROVIDER_ID_VIDEO_PLAYER; + +extern const wchar_t* APPCONTROL_OPERATION_ID_PICK; +extern const wchar_t* APPCONTROL_OPERATION_ID_VIEW; +extern const wchar_t* APPCONTROL_OPERATION_ID_PLAY; +extern const wchar_t* APPCONTROL_OPERATION_ID_COMPOSE; +extern const wchar_t* APPCONTROL_OPERATION_ID_CONFIGURE; +extern const wchar_t* APPCONTROL_OPERATION_ID_MAIN; + +extern const wchar_t* APPCONTROL_KEY_TYPE; +extern const wchar_t* APPCONTROL_KEY_PATH; +extern const wchar_t* APPCONTROL_KEY_INDEX; +extern const wchar_t* APPCONTROL_KEY_ATTACHMENTS; +extern const wchar_t* APPCONTROL_KEY_SELECTION_MODE; +extern const wchar_t* APPCONTROL_KEY_VALUE; +extern const wchar_t* APPCONTROL_KEY_RETURN_TYPE; +extern const wchar_t* APPCONTROL_KEY_LEGACY_RESULT; + +extern const wchar_t* APPCONTROL_DATA_IMAGE; +extern const wchar_t* APPCONTROL_DATA_VIDEO; +extern const wchar_t* APPCONTROL_DATA_SLIDE_SHOW; +extern const wchar_t* APPCONTROL_DATA_EMAIL; +extern const wchar_t* APPCONTROL_DATA_SINGLE; +extern const wchar_t* APPCONTROL_DATA_CONTACT_ID; +extern const wchar_t* APPCONTROL_DATA_URI_FILE; + +extern const wchar_t* SETTING_VALUE_HOME_SCREEN_WALLPAPER; +extern const wchar_t* SETTING_VALUE_LOCK_SCREEN_WALLPAPER; + +extern const wchar_t* FOLDER_PATH_DOWNLOADS; + +extern const wchar_t* TEMP_FILE_PATH_HOME_SCREEN_WALLPAPER; +extern const wchar_t* TEMP_FILE_PATH_LOCK_SCREEN_WALLPAPER; +extern const wchar_t* TEMP_FILE_PATH_WEB_FILE; + +extern const wchar_t* WEB_URL_HTTP; + +extern const wchar_t* CONTENT_EXT_JPG; +extern const wchar_t* CONTENT_EXT_PNG; +extern const wchar_t* CONTENT_EXT_BMP; +extern const wchar_t* CONTENT_EXT_GIF; +extern const wchar_t* CONTENT_EXT_TIF; +extern const wchar_t* CONTENT_EXT_TIFF; +extern const wchar_t* CONTENT_EXT_WBMP; +extern const wchar_t* CONTENT_EXT_JPEG; +extern const wchar_t* CONTENT_EXT_MP4; +extern const wchar_t* CONTENT_EXT_3GP; +extern const wchar_t* CONTENT_EXT_AVI; +extern const wchar_t* CONTENT_EXT_ASF; +extern const wchar_t* CONTENT_EXT_WMV; +extern const wchar_t* CONTENT_EXT_RM; +extern const wchar_t* CONTENT_EXT_FLV; + +extern const wchar_t* CONTENT_QUERY_PREFIX_FILENAME; + +extern const wchar_t* EMPTY_SPACE; +extern const wchar_t* DIRECTORY_SEPARATOR; +extern const wchar_t* FILE_EXT_SEPARATOR; +extern const wchar_t* APPCONTROL_PATH_SEPARATOR; + +extern const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_PLAY; +extern const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_DETAILS; +extern const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_DETAILS_CLOSE; +extern const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_DOWNLOAD; +extern const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_SAVE; +extern const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_X; +extern const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_EDIT_NAME; +extern const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_EDIT_NAME_NORMAL_BACKGROUND; +extern const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_EDIT_NAME_NORMAL_BACKGROUND_PRESS; +extern const wchar_t* IDB_IMAGE_VIEWERFORM_MORE_NORMAL; +extern const wchar_t* IDB_IMAGE_VIEWERFORM_MORE_PRESSED; +extern const wchar_t* IDB_IMAGE_VIEWERFORM_FOOTER_ICON_SHARE_NORMAL; +extern const wchar_t* IDB_IMAGE_VIEWERFORM_FOOTER_ICON_DELETE_NORMAL; + +extern const wchar_t* IDB_IMAGE_SETTERFORM_BUTTON_SET; +extern const wchar_t* IDB_IMAGE_SETTERFORM_BUTTON_SET_PRESS; +extern const wchar_t* IDB_IMAGE_SETTERFORM_BUTTON_CANCEL; +extern const wchar_t* IDB_IMAGE_SETTERFORM_BUTTON_CANCEL_PRESS; + +extern const wchar_t* SECTION_NAME_GALLERY; +extern const wchar_t* SECTION_NAME_IMAGE_VIEWER; +extern const wchar_t* SECTION_NAME_VIDEO_PLAYER; +extern const wchar_t* ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_INTERVAL; +extern const wchar_t* ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_REPEAT; +extern const wchar_t* ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_SHUFFLE; +extern const wchar_t* ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_TRANSITION_EFFECT; +extern const wchar_t* ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_MUSIC; + +#endif /* _IV_TYPES_H_ */ diff --git a/manifest.xml b/manifest.xml new file mode 100644 index 0000000..d1e58d2 --- /dev/null +++ b/manifest.xml @@ -0,0 +1,41 @@ + + + jysyv9o1dc + 1.0.0 + C++App + + Normal + + + 2.0 + + http://tizen.org/privilege/application.launch + http://tizen.org/privilege/contact.read + http://tizen.org/privilege/contact.write + http://tizen.org/privilege/content.read + http://tizen.org/privilege/content.write + http://tizen.org/privilege/power + http://tizen.org/privilege/setting + + + + + + ImageViewer-Ref + + + mainmenu.png + + + + + + + + + + + + + + diff --git a/packaging/apps.ImageViewer.spec b/packaging/apps.ImageViewer.spec new file mode 100644 index 0000000..968da73 --- /dev/null +++ b/packaging/apps.ImageViewer.spec @@ -0,0 +1,62 @@ +Name: apps.ImageViewer +Summary: ImageViewer 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: osp-appfw-internal-devel +BuildRequires: osp-image-internal-devel +BuildRequires: osp-media-internal-devel +BuildRequires: osp-net-internal-devel +BuildRequires: osp-uifw-internal-devel +BuildRequires: pkgconfig(osp-appfw) +BuildRequires: pkgconfig(osp-content) +BuildRequires: pkgconfig(osp-image) +BuildRequires: pkgconfig(osp-image-core) +BuildRequires: pkgconfig(osp-media) +BuildRequires: pkgconfig(osp-net) +BuildRequires: pkgconfig(osp-social) +BuildRequires: pkgconfig(osp-uifw) +BuildRequires: pkgconfig(osp-locations) + +Requires: osp-installer + +%description +Verification application: ImageViewer + +%prep +%setup -q + +%build +MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` +%ifarch %{ix86} +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_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 + +%post +/sbin/ldconfig +PKG_ID=jysyv9o1dc +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/ImageViewer + +%postun +/sbin/ldconfig +PKG_ID=jysyv9o1dc +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..f43e708 --- /dev/null +++ b/res/ara-AE.xml @@ -0,0 +1,99 @@ + + + + تم الوصول إلى أقصى عدد من الحروف + أي + صورة المتصل + عشوائي + رسالة + شاشتا القفل والرئيسية + أساسي + غير ممكن + تاريخ الإنشاء + شذب + تم رفض الإذن + الاستخدامات المتوفرة + الشاشة الرئيسية + الرسائل + تمت + غير قادر على تغيير الاسم. جاري استخدام الملف + بريد إلكتروني + غير معروف + تم المسح + غير قادر على الحفظ + أدخل الاسم + عدم العرض مرة أخرى + حذف + إلغاء + تم بلوغ أقصى عدد من الأحرف (%d) + العدد + طباعة + المدخل خالي + تم بلوغ أقصى عدد من الأحرف (%d) + استخدام الحركة + %s موجود بالفعل + جاري التحميل ... + الشاشة + تمت إزالة بطاقة SD + قص + عرض الصور + خط الطول + خط الطول + فردي + فشل المسح + نوع ملف غير مدعوم + مشاركة + زوم + نسخ + موقع الملف + نفس الاسم مستخدم مسبقا + تنفيذ + المواقع + إنهاء + التوقيت + المدى + كافة الألبومات + النوع + المزيد + خلفية الشاشة الرئيسية + إلغاء + استوديو + الحجم + تمت الإضافة + الصور + تكرار + الاسم + خلفية شاشة القفل + لا ترسل + الدقة + تهيئة + الموقع + ملف صورة غير صالح + موجود بالفعل. هل تريد الاستبدال؟ + مشاركة عبر + التحويل + الوقت المتراكم + الموقع + نوع ملف غير مدعوم + المدى + اسم الملف + فشل النقل + تعيين + تعيين خلفية للشاشة الرئيسية وشاشة القفل + خلفية ‏‫شاشة القفل والشاشة الرئيسية‬ + التفاصيل + تغييرالاسم + ممكن + تنسيق الملف + نقل + لا يمكن المسح + حذف + الفترة + موجود مسبقا + قفل الشاشة + تمت + فشل الحفظ + غير متاح + diff --git a/res/aze-AZ.xml b/res/aze-AZ.xml new file mode 100644 index 0000000..e27b9fe --- /dev/null +++ b/res/aze-AZ.xml @@ -0,0 +1,99 @@ + + + + Simvol sayı maksimuma çatıb + Hər hansı + Zəng edənin şəkli + Təsadüfi + Mesaj + Əsas və kilid ekranları + Əsas + Mümkün deyil + Tarix yaradıldı + Nizamla + İcazə rədd edildi + İstifadəsi mümkün olanlar + Əsas ekran + Mesajlar + Bitdi + Yenidən adlandırmaq mümkün deyildir + Elektron poçtlar + Naməlum + Silindi + Saxlamaq mümkün deyil + Xahiş olunur adı daxil edin + Bir daha göstərmə + Sil + Ləğv et + Simvolların sayı maksimuma (%d) çatıb + Say + Çap et + Boş qeyd + Simvolların sayı maksimuma (%d) çatıb + Hərəkətdən istifadə edin + %s hazırda mövcuddur + Yüklənir... + Displey + SD kart çıxarılmışdır + Yığ + Slayd göstərmə + Uzunluq + Uzunluq + Fərdi + Silmək mümkün olmadı + Dəstəklənməyən fayl tipi + Paylaş + Yaxınlaşdırma/uzaqlaşdırma + Köçür + Faylın yeri + Eyni ad hazırda istifadə edilir + İcra et + Yerlər + Son + Vaxt + En + Bütün albomlar + Tip + Daha įox + Əsas ekranin divar kağızı + Ləğv et + Qalereya + Ölçü + Əlavə edildi + Təsvirlər + Təkrar et + Ad + Ekranin divar kəğizi kilidlə + Göndərmə + Rezolyusiya + Format + Yeri + Şəkil faylı səhvdir + Artıq mövcuddur. Üzərindən yazılsın? + Paylaş + Göndərilir + Yığılmış vaxt + Yeri + Dəytəklənməyən\nfayl tipi + En + Fayl adı + Keçmə alınmadı + Qur + Əsas ekran üçün divar kağızını qur və ekranı kilidlə + Başlanğıc və kilid ekranı divar kağızı + Təfsilatlar + Adı dəyişdir + Mümkündür + Faylın formatı + Göndər + Silmək mümkün deyil + Sil + İnterval + Artıq var + Ekranı kilidləyin + Yerinə yetirildi + Yaddaşa yazmaq mümkün olmadı + M/D + diff --git a/res/bul-BG.xml b/res/bul-BG.xml new file mode 100644 index 0000000..f52ad01 --- /dev/null +++ b/res/bul-BG.xml @@ -0,0 +1,99 @@ + + + + Достигнат максимален брой знаци + Всеки + Изобр. повикващ + Случаен + Съобщение + Начален и заключен екран + Базово + Невъзможно + Дата на създаване + Орязване + Отказано разрешение + Налични употреби + Начален екран + Съобщения + Готово + Не може да се преименува + Email + Няма информация + Изтрито + Не може да запази + Въведете име + Не показвай отново + Изтриване + Отказ + Достигнат е максималният брой знаци (%d) + Броене + Отпечатаване + Празен запис + Достигнат е максималният брой знаци (%d) + С движение + %s вече съществува + Зареждане + Дисплей + SD картата е извадена + Изрязване + Слайдшоу + Геогр. дължина + Геогр. дължина + Индивидуален + Неуспешно изтриване + Неподдържан тип файл + Споделям + Зум + Копиране + Местоположение на файла + Такова име вече се използва + Изпълни + Местоположения + Край + Време + Геогр. ширина + Всички албуми + Тип + Още + Тапет начален екран + Отмени + Галерия + Размер + Добавен + Изображения + Повтаряне + Име + Тапет заключен екран + Не изпращай + Разделителна способност + Формат + Позиция + Невалиден файл на изображение + Вече съществува. Презапис? + Споделяне чрез + Препращане + Натрупано време + Позиция + Неразпознат тип\nфайл + Геогр. ширина + Име на файл: + Неуспешно преместване + Задаване като + Задаване на тапет за началния екран и екрана за заключване + Тапет на началния екран и на заключен екран + Детайли + Промяна на име + Lъзможно + Формат на файла + Премести + Невъзможно изтриване + Премаxване + Интервал + Вече съществува + Заключен екран + Готово + Запазване неуспешно + н.д. + diff --git a/res/cat-ES.xml b/res/cat-ES.xml new file mode 100644 index 0000000..f63d54a --- /dev/null +++ b/res/cat-ES.xml @@ -0,0 +1,99 @@ + + + + S'ha assolit el nombre màxim de caràcters + Qualsevol + Imatge de la persona que truca + Aleatori + Missatge + Pantalla inici i bloqueig + Bàsic + No és possible + Data creació + Acoblar + Permís denegat + Usos disponibles + Pantalla d'inici + Missatges + Finalit. + No es pot canviar nom + Correu electrònic + Desconegut + Esborrat + No es poden desar + Introduir nom + No tornar a mostrar + Esborrar + Cancel·lar + S'ha assolit el nombre màxim de caràcters (%d) + Comptatge + Imprimir + L'entrada és buida + S'ha assolit el nombre màxim de caràcters (%d) + Utilitzar moviment + %s ja existeix + Carregant... + Pantalla + Sense targeta SD + Retallar + Presentació de diapositives + Longitud + Longitud + Individual + Error en esborrar + No s'admet el tipus de fitxer + Compartir + Zoom + Copiar + Ubicació del fitxer + El mateix nom ja està en ús + Executar + Ubicacions + Finalitzar + Hora + Latitud + Tots els àlbums + Tipus + Més + Fons pantalla inici + Cancel·lar + Galeria + Mida + Afegit + Imatges + Repetir + Nom + Bloq fons pant inici + No enviar + Resolució + Format + Ubicació + Arxiu d'imatges no vàlid + Ja existeix. Sobreescriure? + Compartir mitjançant + Reenviant + Temps acumulat + Ubicació + No s'admet el\ntipus de fitxer + Latitud + Nom del fitxer + Error en moure + Definir com a + Definir fons de la pantalla d'inici i bloquejar pantalla + Fons de pantalla de pantalla d'inici i bloqueig + Detalls + Canviar nom + Possible + Format del fitxer + Moure + No es pot esborrar + Eliminar + Interval + Ja existeix + Bloquejar pantalla + Finalitzat + Error en desar + N/D + diff --git a/res/ces-CZ.xml b/res/ces-CZ.xml new file mode 100644 index 0000000..44df35a --- /dev/null +++ b/res/ces-CZ.xml @@ -0,0 +1,99 @@ + + + + Bylo dosaženo maximálního počtu znaků + Vše + Obrázek volajícího + Náhodně + Zpráva + Domovská a zamknutá obrazovka + Základní + Nemožné + Datum vytvoření + Oříznout + Povolení bylo odepřeno + Počet použití k dispozici + Domovská obrazovka + Zprávy + Hotovo + Nelze přejmenovat + E-mail + Neznámé + Odstraněno + Nelze uložit + Zadat jméno + Znovu nezobrazovat + Odstranit + Zrušit + Bylo dosaženo maximálního počtu znaků (%d) + Počet + Tisk + Prázdná položka + Bylo dosaženo maximálního počtu znaků (%d) + Použít pohyb + %s již existuje + Nahrávám... + Displej + SD karta byla vyjmuta + Oříznout + Prezentace + Zeměpisná délka + Zeměpisná délka + Individuální + Odstranění se nezdařilo + Nepodporovaný typ souboru + Sdílet + Přiblížení + Kopírovat + Umístění souboru + Stejný název je již použit + Provést + Polohy + Konec + Čas + Zeměpisná šířka + Všechna alba + Typ + Další + Pozadí dom. obrazovky + Zrušit + Galerie + Velikost + Přidáno + Obrázky + Opakovat + Jméno + Zamknout pozadí obr. + Neodesílat + Rozlišení + Formát + Místo + Neplatný soubor obrázku + Již existuje. Přepsat? + Sdílet pomocí + Předání + Celkový čas + Místo + Nepodporovaný\ntyp souboru + Zeměpisná šířka + Název souboru + Přesunutí se nezdařilo + Nastavit jako + Nastavit pozadí pro domovskou obrazovku a zamknout obrazovku + Pozadí domovské obrazovky a zamknutého displeje + Podrobnosti + Změnit název + Možné + Formát souboru + Přesunout + Nelze odstranit + Odstranit + Interval + Již existuje + Zamknout displej + Hotovo + Uložení se nezdařilo + Nepoužito + diff --git a/res/dan-DK.xml b/res/dan-DK.xml new file mode 100644 index 0000000..d23b87b --- /dev/null +++ b/res/dan-DK.xml @@ -0,0 +1,99 @@ + + + + Det maksimale antal tegn er nået + Vilkårlig + Opkalds-id-billede + Tilfældig + Meddelelse + Start- og låseskærm + Grundlæggende + Ikke mulig + Dato oprettet + Beskær + Tilladelse afslået + Gange tilbage + Startskærm + Meddelelser + Udført + Kunne ikke omdøbe + E-mail + Ukendt + Slettet + Kunne ikke gemme + Angiv navn + Vis ikke igen + Slet + Annullér + Det maksimale antal tegn (%d) er nået + Antal + Udskriv + Posten er tom + Det maksimale antal tegn (%d) er nået + Brug bevægelse + %s eksisterer allerede + Indlæser data ... + Skærm + SD-kort fjernet + Beskær + Diasshow + Længdegrad + Længdegrad + Individuel + Sletning mislykkedes + Filtype understøttes ikke + Del + Zoom + Kopiér + Filplacering + Det samme navn er allerede i brug + Udfør + Steder + Afslut + Tid + Breddegrad + Alle album + Type + Mere + Baggr. for startskærm + Annullér + Galleri + Størrelse + Tilføjet + Billeder + Gentag + Navn + Baggrund for skærmlås + Send ikke + Opløsning + Formatér + Placering + Ugyldig billedfil + Findes allerede. Vil du overskrive? + Del via + Viderestiller + Samlet tid + Placering + Filtype\nunderstøttes ikke + Breddegrad + Filnavn + Flytning mislykkedes + Vælg som + Angiv baggrund for startskærm, og lås skærm + Baggrund for startskærm og låseskærm + Detaljer + Skift navn + Muligt + Filformat + Flyt + Kunne ikke slette + Fjern + Interval + Findes allerede + Låseskærm + Udført + Kunne ikke gemme + Ikke tilgængelig + diff --git a/res/deu-DE.xml b/res/deu-DE.xml new file mode 100644 index 0000000..35b3eb8 --- /dev/null +++ b/res/deu-DE.xml @@ -0,0 +1,99 @@ + + + + Maximal zulässige Zeichenanzahl erreicht. + Jede + Anruferbild + Zufall + Nachricht + Start- und Sperrbildschirm + Einfach + Nicht möglich + Erstellt am + Zuschneiden + Berechtigung abgelehnt + Verfügbare Nutzungen + Startbildschirm + Nachrichten + OK + Umbenennen nicht möglich + E-Mail + Unbekannt + Gelöscht + Speichern nicht möglich + Name eingeben + Nicht mehr anzeigen + Löschen + Abbrechen + Maximale Anzahl an Zeichen (%d) erreicht. + Anzahl + Drucken + Eintrag ist leer + Maximale Anzahl an Zeichen (%d) erreicht. + Bewegung verwenden + %s ist bereits vorhanden + Lädt... + Anzeige + SD-Karte entfernt + Zuschneiden + Diashow + Länge + Länge + Individuell + Löschen fehlgeschlagen + Nicht unterstützter Dateityp + Senden via + Zoom + Kopieren + Dateispeicherort + Derselbe Name wird bereits verwendet + Ausführen + Standorte + Beenden + Zeit + Breite + Alle Alben + Typ + Mehr + Home-Hintergrund + Abbrechen + Galerie + Größe + Hinzugefügt + Eigene Bilder + Wiederholen + Name + Sperre-Hintergrund + Nicht senden + Auflösung + Formatieren + Ort + Ungültige Bilddatei + Bereits vorhanden. Überschreiben? + Senden via + Weiterleitung + Gesamtzeit + Standortzugriff + Dateityp\nnicht unterstützt + Breite + Dateiname + Verschieben fehlgeschlagen + Einstellen als + Hintergrund für Start- und Sperrbildschirm + Hintergrund für Start- und Sperrbildschirm + Details + Name ändern + Möglich + Dateiformat + Verschieben + Kann nicht gelöscht werden + Entfernen + Intervall + Bereits vorhanden + Sperrbildschirm + OK + Speichern fehlgeschlagen + Entfällt + diff --git a/res/ell-GR.xml b/res/ell-GR.xml new file mode 100644 index 0000000..f728d62 --- /dev/null +++ b/res/ell-GR.xml @@ -0,0 +1,99 @@ + + + + Ο μέγιστος αριθμός χαρακτήρων συμπληρώθηκε + Οποιοδήποτε + Εικόνα καλούντος + Τυχαία + Μήνυμα + Αρχική οθόνη και οθόνη κλειδώματος + Βασικός + Αδύνατο + Ημερομηνία δημιουργίας + Ξάκρισμα + Δεν έχετε δικαίωμα πρόσβασης + Διαθέσιμες χρήσεις + Αρχική οθόνη + Μηνύματα + Ok + Δεν είναι δυνατή η μετονομασία + Email + Άγνωστο + Διαγράφηκε + Αδύνατη αποθήκευση + Εισαγωγή ονόματος + Να μην εμφανιστεί ξανά + Διαγραφή + Ακύρωση + Συμπληρώθηκε ο μέγιστος αριθμός χαρακτήρων (%d) + Πλήθος αρχείων + Εκτύπωση + Κενή καταχώρηση + Συμπληρώθηκε ο μέγιστος αριθμός χαρακτήρων (%d) + Χρήση κίνησης + Το αρχείο %s υπάρχει ήδη + Φόρτωση... + Οθόνη + Αφαιρέθηκε η κάρτα SD + Περικοπή + Παρουσίαση + Γεωγραφικό μήκος + Γεωγραφικό μήκος + Μεμονωμένο + Αποτυχία διαγραφής + Μη υποστηριζόμενος τύπος αρχείου + Κοινόχρηστο + Ζουμ + Αντιγραφή + Θέση αρχείου + Το όνομα χρησιμοποιείται ήδη + Εκτέλεση + Θέσεις + Λήξη + Ώρα + Γεωγραφικό πλάτος + Όλα τα άλμπουμ + Τύπος + Περισσότερα + Φόντο αρχικής οθόνης + Άκυρο + Συλλογή + Μέγεθος + Προστέθηκε + Εικόνες + Επανάληψη + Όνομα + Φόντο οθόνης κλειδώμ. + Να μην γίνει αποστολή + Ανάλυση + Μορφοποίηση + Θέση + Μη έγκυρο αρχείο εικόνας + Υπάρχει ήδη. Αντικατάσταση; + Κοινή χρήση μέσω + Προώθηση + Συνολικός χρόνος + Θέση + Μη υποστηριζόμενος\nτύπος αρχείου + Γεωγραφικό πλάτος + Όνομα αρχείου + Αποτυχία μετακίνησης + Ορισμός ως + Ορισμός φόντου για την αρχική οθόνη και την οθόνη κλειδώματος + Ταπετσαρία αρχικής οθόνης και οθόνης κλειδώματος + Λεπτομέρειες + Αλλαγή ονόματος + Δυνατό + Μορφή αρχείου + Μετακίνηση + Δεν είναι δυνατή η διαγραφή + Κατάργηση + Διάστημα + Υπάρχει ήδη + Οθόνη κλειδώματος + Τέλος + Αποτυχία αποθήκευσης + Μη διαθέσιμο + diff --git a/res/eng-GB.xml b/res/eng-GB.xml new file mode 100644 index 0000000..39e7b0f --- /dev/null +++ b/res/eng-GB.xml @@ -0,0 +1,99 @@ + + + + Maximum number of characters reached + Any + Caller image + Random + Message + Home and lock screens + Basic + Impossible + Date created + Trim + Permission denied + Available uses + Home screen + Messages + Done + Unable to rename + Email + Unknown + Deleted + Unable to save + Enter name + Do not show again + Delete + Cancel + Maximum number of characters (%d) reached + Count + Print + Entry is empty + Maximum number of characters (%d) reached + Use motion + %s already exists + Loading... + Display + SD card removed + Crop + Slide show + Longitude + Longitude + Individual + Delete failed + Unsupported file type + Share + Zoom + Copy + File location + Same name already in use + Execute + Locations + End + Time + Latitude + All albums + Type + More + Home screen wallpaper + Cancel + Gallery + Size + Added + Images + Repeat + Name + Lock screen wallpaper + Do not send + Resolution + Format + Location + Invalid image file + Already exists. Overwrite? + Share via + Forwarding + Accumulated time + Location + Unsupported\nfile type + Latitude + File name + Moving failed + Set as + Set wallpaper for home screen and lock screen + Home and lock screen wallpaper + Details + Change name + Possible + File format + Move + Unable to delete + Remove + Interval + Already exists + Lock screen + Done + Saving failed + N/A + diff --git a/res/eng-PH.xml b/res/eng-PH.xml new file mode 100644 index 0000000..306f2d8 --- /dev/null +++ b/res/eng-PH.xml @@ -0,0 +1,99 @@ + + + + Maximum number of characters reached + Any + Caller image + Random + Message + Home and lock screens + Basic + Impossible + Date created + Trim + Permission denied + Available uses + Home screen + Messages + Done + Unable to rename + Email + Unknown + Deleted + Unable to save + Enter name + Do not show again + Delete + Cancel + Maximum number of characters (%d) reached + Count + Print + Phone contact is empty + Maximum number of characters (%d) reached + Use motion + %s already exists + Loading... + Display + SD card removed + Crop + Slide show + Longitude + Longitude + Individual + Delete failed + Unsupported file type + Share + Zoom + Copy + File location + Same name already in use + Execute + Locations + End + Time + Latitude + All albums + Type + More + Home screen wallpaper + Cancel + Gallery + Size + Added + Images + Repeat + Name + Lock screen wallpaper + Do not send + Resolution + Format + Location + Invalid image file + Already exists. Overwrite? + Share via + Forwarding + Accumulated time + Location + Unsupported\nfile type + Latitude + File name + Moving failed + Set as + Set wallpaper for home screen and lock screen + Home and lock screen wallpaper + Details + Change name + Possible + File format + Move + Unable to delete + Remove + Interval + Already exists + Lock screen + Done + Saving failed + N/A + diff --git a/res/eng-US.xml b/res/eng-US.xml new file mode 100644 index 0000000..e9d7660 --- /dev/null +++ b/res/eng-US.xml @@ -0,0 +1,99 @@ + + + + Maximum number of characters reached + Any + Caller image + Random + Message + Home and lock screens + Basic + Impossible + Date created + Trim + Permission denied + Available uses + Home screen + Messages + Done + Unable to rename + Email + Unknown + Deleted + Unable to save + Enter name + Do not show again + Delete + Cancel + Maximum number of characters (%d) reached + Count + Print + Entry is empty + Maximum number of characters (%d) reached + Use motion + %s already exists + Loading... + Display + SD card removed + Crop + Slide show + Longitude + Longitude + Individual + Delete failed + Unsupported file type + Share + Zoom + Copy + File location + Same name already in use + Execute + Locations + End + Time + Latitude + All albums + Type + More + Home screen wallpaper + Cancel + Gallery + Size + Added + Images + Repeat + Name + Lock screen wallpaper + Do not send + Resolution + Format + Location + Invalid image file + Already exists. Overwrite? + Share via + Forwarding + Accumulated time + Location + Unsupported\nfile type + Latitude + File name + Moving failed + Set as + Set wallpaper for home screen and lock screen + Home and lock screen wallpaper + Details + Change name + Possible + File format + Move + Unable to delete + Delete + Interval + Already exists + Lock screen + Done + Saving failed + N/A + diff --git a/res/est-EE.xml b/res/est-EE.xml new file mode 100644 index 0000000..50477d0 --- /dev/null +++ b/res/est-EE.xml @@ -0,0 +1,99 @@ + + + + Lubatud arv märke on täis + Ükskõik milline + Helistaja pilt + Juhuslik + Sõnum + Ava- ja lukustusekraanid + Põhiline + Võimatu + Kuupäev loodud + Lõika + Loast keelduti + Võimalikud kasutusviisid + Avaleht + Sõnumid + Valmis + Ei saa ümber nimetada + E-post + Tundmatu + Kustutatud + Ei saa salvestada + Sisestage nimi + Ära näita uuesti + Kustuta + Tühista + Maksimaalne tähemärkide arv (%d) on saavutatud + Loendamine + Prindi + Kirje on tühi + Maksimaalne tähemärkide arv (%d) on saavutatud + Kasuta liigutusi + %s on juba olemas + Laadimine... + Ekraan + SD-kaart on eemaldatud + Kärbi + Slaidiseanss + Pikkuskraad + Pikkuskraad + Individuaalne + BT-peakomplekt sees + Toetuseta failitüüp + Jaga + Suumi + Kopeeri + Faili asukoht + See nimi on juba kasutusel + Käivita + Asukohad + Lõpeta + Kellaaeg + Laiuskraad + Kõik albumid + Tüüp + Veel + Avaekr. taustp. + Tühista + Galerii + Suurus + Lisatud + Pildid + Korda + Nimi + Lukustusekr. taustp. + Ära saada + Eraldusvõime + Vorming + Asukoht + Vigane pildifail + On juba olemas. Kas kirjutada üle? + Jaga: + Edastamine + Kogunenud aeg + Asukoht + Mittetoetatud\nfailitüüp + Laiuskraad + Failinimi + Teisaldamine nurjus + Määra + Määra taustpilt avaekraanile ja lukustusekraanile + Ava- ja lukustusekraani taustpilt + Üksikasjad + Muuda nime + Võimalik + Failivorming + Teisalda + Ei saa kustutada + Eemalda + Intervall + Juba olemas + Lukusta ekraan + Valmis + Salvestamine nurjus + Pole teada + diff --git a/res/eus-ES.xml b/res/eus-ES.xml new file mode 100644 index 0000000..6841544 --- /dev/null +++ b/res/eus-ES.xml @@ -0,0 +1,99 @@ + + + + Gehienezko karaktere kopurura heldu zara + Edozein + Dei egilearen irudia + Random efektua + Mezua + Hasiera eta blokeo pantailak + Oinarrizkoa + Ezinezkoa + Sortze data + Kimatu + Baimena ukatuta + Erabilera eskuragarriak + Hasierako pantaila + Mezuak + Amaituta + Ezin da berrizendatu + Posta elektroniko mezuak + Ezezaguna + Ezabatua + Ezin da gorde + Izena idatzi + Ez erakutsi berriro + Ezabatu + Ezeztatu + Gehienezko karaktere kopurura (%d) iritsi zara + Kontatu + Inprimatu + Sarrera hutsik dago + Gehienezko karaktere kopurura (%d) iritsi zara + Erabili mugimendua + %s dagoeneko bada + Kargatzen... + Pantaila + SD txartela kenduta + Moztu + Diapositiba aurkezpena + Longitudea + Longitudea + Indibiduala + Akatsa ezabatzerakoan + Fitxategi mota ez bateragarria + Partekatu + Zooma + Kopiatu + Fitxategi kokapena + Izen bera dagoeneko erabiltzen + Abiarazi + Kokapenak + Amaitu + Ordua + Latitudea + Album guztiak + Mota + Gehiago + Hasierako pantailako horma papera + Ezeztatu + Galeria + Tamaina + Gehituta + Irudiak + Errepikatu + Izena + Blokeo pantailako horma papera + Ez bidali + Bereizmena + Formateatu + Kokalekua + Irudi fitxategi baliogabea + Dagoeneko bada. Berridatzi? + Partekatu honen bidez + Birbidaltzea + Metatutako denbora + Kokalekua + Fitxategi mota\nez bateragarria + Latitudea + Fitxategiaren izena + Errorea mugitzerakoan + Honela zehaztu + Ezarri horma papera hasierako pantailarako eta blokeo pantailarako + Pantaila nagusiaren eta blokeo pantailaren horma papera + Xehetasunak + Izena aldatu + Posible + Fitxategiaren formatua + Mugitu + Ezin da ezabatu + Kendu + Tartea + Dagoeneko badago + Blokeatu pantaila + Amaituta + Errorea gordetzerakoan + E/A + diff --git a/res/fin-FI.xml b/res/fin-FI.xml new file mode 100644 index 0000000..1c3da96 --- /dev/null +++ b/res/fin-FI.xml @@ -0,0 +1,99 @@ + + + + Merkkien enimmäismäärä saavutettu + Mikä tahansa + Soittajan kuva + Satunnainen + Viesti + Alku- ja lukitusnäytöt + Perus + Mahdoton + Luontipäivämäärä + Rajaa + Lupa evätty + Jäljellä olevat käyttökerrat + Alkunäyttö + Viestit + Valmis + Ei voi nimetä uudelleen + Sähköposti + Tuntematon + Poistettu + Tallennus epäonnistui + Kirjoita nimi + Älä näytä uudestaan + Poista + Peruuta + Merkkien enimmäismäärä (%d) on saavutettu + Määrä + Tulosta + Tyhjä tieto + Merkkien enimmäismäärä (%d) on saavutettu + Käytä liikettä + %s on jo olemassa + Ladataan... + Näyttö + SD-kortti on poistettu + Rajaa + Diaesitys + Pituusaste + Pituusaste + Yksittäinen + Poisto epäonnistui + Tiedostotyyppiä ei tueta + Jaa + Zoomaus + Kopioi + Tiedoston sijainti + Sama nimi on jo käytössä + Suorita + Sijainnit + Sulje + Aika + Leveysaste + Kaikki albumit + Tyyppi + Lisää + Alkunäytön taustakuva + Peruuta + Galleria + Koko + Lisätty + Kuvat + Toista + Nimi + Luk. näytön taustak. + Älä lähetä + Tarkkuus + Alusta + Paikka + Virheellinen kuvatiedosto + On jo olemassa. Päivitetäänkö? + Jakotapa + Edelleenlähetys + Kertynyt aika + Osoite + Tiedostotyyppiä\nei tueta + Leveysaste + Tiedoston nimi + Siirto epäonnistui + Aseta + Määritä alkunäytön ja lukitusnäytön taustakuvat + Alku- ja lukitusnäytön taustakuva + Yksityiskohdat + Vaihda nimi + Mahdollinen + Tiedostomuoto + Siirrä + Ei voi poistaa + Poista + Väli + On jo olemassa + Lukitusnäyttö + Tehty + Tallentaminen epäonnistui + - + diff --git a/res/fra-CA.xml b/res/fra-CA.xml new file mode 100644 index 0000000..08dded8 --- /dev/null +++ b/res/fra-CA.xml @@ -0,0 +1,99 @@ + + + + Nb. max. de caractères atteint + N'importe + Image de l'appelant + Aléatoire + Message + Écran d'accueil et écran verrouillé + Basique + Impossible + Date de création + Rogner + Autorisation refusée + Utilisations disponibles + Écran d'accueil + Messages + OK + Impossible de renommer l'élément + Courriel + Inconnu + Supprimé + Enregistrement impossible + Saisir un nom + Ne plus afficher + Supprimer + Annuler + Nombre maximum de caractères (%d) atteint + Compte + Imprimer + Entrée vide + Nombre maximum de caractères (%d) atteint + Utiliser les mouvements + %s existe déjà + Chargement... + Affichage + Carte SD retirée + Rogner + Diaporama + Longitude + Longitude + Individuel + Échec de suppression + Type de fichier non pris en charge + Partager + Zoom + Copier + Emplacement du fichier + Nom déjà utilisé + Exécuter + Emplacements + Fin + Heure + Latitude + Tous les albums + Type + Plus + Papier peint d'accueil + Annuler + Galerie + Taille + Ajouté + Images + Répéter + Nom + Fond d'écran verr. + Ne pas envoyer + Résolution + Format + Emplacement + Fichier image non valide + Existe déjà. L'écraser? + Partager via + Transfert + Temps accumulé + Emplacement + Type de fichier\nnon pris en charge + Latitude + Nom de fichier + Échec du déplacement + Définir comme + Définir un papier peint pour les écrans d'accueil et de verrouillage + Fond d'écran de verrouillage et accueil + Détails + Modifier le nom + Possible + Format de fichier + Déplacer + Suppression impossible + Supprimer + Intervalle + Existe déjà + Écran verrouillé + OK + Échec de l'enregistrement + s.o. + diff --git a/res/fra-FR.xml b/res/fra-FR.xml new file mode 100644 index 0000000..1f26c9d --- /dev/null +++ b/res/fra-FR.xml @@ -0,0 +1,99 @@ + + + + Nb. max. de caractères atteint + N'importe + Image d'appelant + Aléatoire + Message + Écrans d\'accueil et de verrouillage + Basique + Impossible + Date créée + Rogner + Autorisation refusée + Utilisations disponibles + Écran d'accueil + Messages + Effectué + Impossible de renommer l'élément + Email + Inconnu + Supprimé + Enregistrement impossible + Saisissez votre nom + Ne plus afficher + Supprimer + Annuler + Le nombre maximum de caractères (%d) est atteint + Compte + Imprimer + Entrée vide + Le nombre maximum de caractères (%d) est atteint + Utiliser les mouvements + %s existe déjà + Chargement... + Affichage + Carte SD retirée + Rogner + Diaporama + Longitude + Longitude + Individuel + Échec de suppression + Type de fichier non pris en charge + Partager + Zoom + Copier + Emplacement du fichier + Nom déjà utilisé + Exécuter + Emplacements + Fin + Heure + Latitude + Tous les albums + Type + Plus + Fond d'écran d'accueil + Annuler + Galerie + Taille + Ajouté + Images + Répéter + Nom + Fond d'écran de verrouillage + Ne pas envoyer + Résolution + Formater + Emplacement + Format de fichier image non valide + Existe déjà. L' écraser ? + Partager via + Transfert + Temps accumulé + Position + Type de fichier\nnon pris en charge + Latitude + Nom de fichier + Échec du déplacement + Définir comme + Définir un fond d'écran pour les écrans d'accueil et de verrouillage + Fonds d'écran de verrouillage et d'accueil + Détails + Modifier le nom + Possible + Format de fichier + Déplacer + Suppression impossible + Supprimer + Intervalle + Existe déjà + Écran de verrouillage + Effectué + Échec de l'enregistrement + N/A + diff --git a/res/gle-IE.xml b/res/gle-IE.xml new file mode 100644 index 0000000..fe9e340 --- /dev/null +++ b/res/gle-IE.xml @@ -0,0 +1,99 @@ + + + + Uaslíon na gcarachtar bainte amach + Ceann ar bith + Íomhá ghlaoiteora + Randamach + Teachtaireacht + Scáileáin bhaile agus ghlasála + Bunúsach + Dodhéanta + Dáta a rinneadh + Bearr + Cead séanta + Úsáidí atá ar fáil + Scáileán baile + Teachtaireachtaí + Déanta + Ní féidir athainmniú + R-phost + Anaithnid + Scriosta + Ní féidir sábháil + Iontráil ainm + Ná taispeáin arís + Scrios + Cuir ar ceal + Uaslíon na gcarachtar (%d) bainte amach + Áireamh + Priontáil + Tá an iontráil folamh + Uaslíon na gcarachtar (%d) bainte amach + Úsáid gluaisne + Tá %s ann cheana + Ag lódáil... + Taispeáint + Cárta SD bainte + Bearr + Taispeántas sleamhnán + Domhanfad + Domhanfad + Duine aonair + Theip ar scriosadh + Cineál comhaid gan tacú + Comhroinn + Zúmáil + Cóipeáil + Suíomh comhaid + Ainm céanna in úsáid cheana + Rith + Suíomhanna + Scoir + Am + Leithead + Gach albam + Cineál + Tuilleadh + Cúlbhrat an sc. baile + Cuir ar ceal + Gailearaí + Méid + Curtha leis + Íomhánna + Déan arís + Ainm + Cúlbhrat an sc. glasála + Ná seol + Taifeach + Formáidigh + Suíomh + Comhad íomhá neamhbhailí + Ann cheana. Forscríobh? + Comhroinn le + Seoladh ar aghaidh + Am carnta + Suíomh + Cineál comhaid\ngan tacú + Leithead + Comhadainm + Theip ar bhogadh + Socraigh mar + Socraigh cúlbhrat don scáileán baile agus don scáileán glasála + Cúlbhrat baile agus don scáileán glasála + Sonraí + Athraigh ainm + Indéanta + Formáid an chomhaid + Bog + Ní féidir scriosadh + Bain + Eatramh + Ann cheana + Glasáil an scáileán + Déanta + Theip ar shábháil + N/B + diff --git a/res/glg-ES.xml b/res/glg-ES.xml new file mode 100644 index 0000000..c697ba5 --- /dev/null +++ b/res/glg-ES.xml @@ -0,0 +1,99 @@ + + + + Número máximo de caracteres alcanzado + Calquera + Imaxe do chamante + Ao chou + Mensaxe + Pantalla de inicio e bloqueo + Básico + Non é posible + Data creada + Recortar + Permiso denegado + Usos dispoñibles + Pantalla de inicio + Mensaxes + Finalizado + Non se pode cambiar o nome + Correo electrónico + Descoñecido + Eliminado + Non se pode gardar + Introducir nome + Non volver mostrar + Eliminar + Cancelar + Alcanzouse o número máximo de carácteres (%d) + Contar + Imprimir + A entrada está baleira + Alcanzouse o número máximo de carácteres (%d) + Usar movemento + %s xa existe + Cargando... + Pantalla + Quitouse a tarxeta SD + Volver marcar + Presentación de diapositivas + Lonxitude + Lonxitude + Individual + Erro ao eliminar + Tipo de arquivo non admitido + Compartir + Zoom + Copiar + Localización do arquivo + Este nome xa está en uso + Executar + Localizacións + Fin + Hora + Latitude + Todos os álbums + Tipo + Máis + Fondo pant. inicio + Cancelar + Galería + Tamaño + Engadido + Imaxes + Repetir + Nome + Fondo pant. bloqueo + Non enviar + Resolución + Formato + Situación + Imaxe de arquivo non válida + Xa existe. Sobrescribir? + Compartir a través de + Reenviando + Tempo acumulado + Localización + Tipo de arquivo\nnon admitido + Latitude + Nome do arquivo + Erro ao mover + Definir como + Definir fondo para pantalla de inicio e pantalla de bloqueo + Fondo da pantalla de inicio e de bloqueo + Detalles + Cambiar nome + Posible + Formato de arquivo + Mover + Non se pode eliminar + Eliminar + Intervalo + Xa existe + Bloquear pantalla + Finalizado + Erro ao gardar + N/D + diff --git a/res/hin-IN.xml b/res/hin-IN.xml new file mode 100644 index 0000000..3df2d2f --- /dev/null +++ b/res/hin-IN.xml @@ -0,0 +1,99 @@ + + + + वर्णो की संख्‍या अधिकतम पहुँची + कोई + कॉलर छवि + रैन्डम + सन्देश + होम और लॉक स्‍क्रीन + बेसिक + असंभव + दिनांक निर्मित + ट्रिम करें + अनुमति से इनकार + उपलब्ध उपयोग + होम स्क्रीन + सन्देश + हुआ + नाम बदलने में अक्षम + ईमेल + अज्ञात + हटाया गया + सेव करने में असमर्थ + नाम प्रविष्ट करें + दुबारा न दिखाएँ + हटाएँ + रद्द करें + वर्णों की अधिकतम संख्या (%d) तक पहुँच गया + गणना + प्रिंट करें + प्रविष्टि खाली है + वर्णों की अधिकतम संख्या (%d) तक पहुँच गया + गति का उपयोग करें + %s पहले से मौजूद है + लोड हो रहा है... + प्रदर्शन + SD कार्ड निकाला गया + क्रॉप + स्लाइड शो + देशांतर + देशांतर + अलग + हटाना विफल + असमर्थित फाइल प्रकार + शेयर करें + ज़ूम + कॉपी करें + फ़ाइल स्थान + ऐसा ही नाम पहले से इस्तेमाल में है + निष्पादित करें + स्थान + समाप्त करें + समय + अक्षांश + सभी एलबम्‍स + प्रकार + अधिक + होम स्क्रीन वॉलपेपर + रद्द + गैलरी + आकार + जोड़ा गया + छवियाँ + दोहराव + नाम + लॉक स्क्रीन वॉलपेपर + न भेजें + रेज़ोल्यूशन + फॉर्मेट + स्थान + अमान्य इमेज फ़ाइल + पहले से मौजूद है। ओवरराइट करें? + इसके द्वारा साझा करें + अग्रेषण + संचित समय + स्थान + असमर्थित\nफ़ाइल प्रकार + अक्षांश + फाइल का नाम + ले जाना विफल हुआ + के रूप में सेट करें + होम स्क्रीन और लॉक स्‍क्रीन के लिए वॉलपेपर सेट करें + होम और लॉक स्क्रीन वॉलपेपर + विवरण + नाम बदलें + संभव + फ़ाइल फॉर्मेट + ले जाएँ + हटाने में अक्षम + हटाएँ + अन्तराल + पहले से ही मौजूद + स्क्रीन लॉक करें + हुआ + सेव करना विफल + लागू नहीं + diff --git a/res/hrv-HR.xml b/res/hrv-HR.xml new file mode 100644 index 0000000..16c2fe2 --- /dev/null +++ b/res/hrv-HR.xml @@ -0,0 +1,99 @@ + + + + Maks. broj znakova + Bilo koji + Slika pozivatelja + Nasumično + Poruka + Početni i zaslon zaključavanja + Osnovno + Nemoguće + Datum + Skrati + Dozvola odbijena + Preostalo upotreba + Početni zaslon + Poruke + OK + Nemoguće preimenovati + Email + Nepoznato + Obrisano + Spremanje nemoguće + Unesite ime + Ne prikazuj više + Obriši + Prekid + Maksimalan broj znakova (%d) + Broj + Ispis + Unos prazan + Maksimalan broj znakova (%d) + Koristi pokrete + %s već postoji + Učitavanje... + Zaslon + SD kartica izvađena + Izreži + Prezentacija + Geo. duljina + Geo. duljina + Individualno + Brisanje neuspješno + Nepodržana datoteka + Dijeli + Zoom + Kopiraj + Lokacija datoteke + Već postoji isto ime + Pokreni + Lokacije + Kraj + Vrijeme + Geo. širina + Svi albumi + Vrsta + Više + Pozadina poč. zaslona + Prekid + Album + Veličina + Dodano + Slike + Ponavljanje + Naziv + Pozadina za zaslon zaključavanja + Ne šalji + Rezolucija + Formatiraj + Lokacija + Neispravna datoteka + Već postoji. Piši preko? + Dijeljenje preko + Prosljeđivanje + Ukupno vrijeme + Lokacija + Nepodržana\nvrsta datoteke + Geo. širina + Naziv datoteke + Premještanje neuspješno + Postavi za + Postavite pozadinu za početni zaslon i zaslon zaključavanja + Pozadina početnog i zaslona zaključavanja + Detalji + Promijenite ime + Moguće + Format datoteke + Premjesti + Brisanje nemoguće + Ukloni + Interval + Već postoji + Zaslon zaključavanja + OK + Spremanje neuspješno + nema + diff --git a/res/hun-HU.xml b/res/hun-HU.xml new file mode 100644 index 0000000..3ffff7e --- /dev/null +++ b/res/hun-HU.xml @@ -0,0 +1,99 @@ + + + + Nincs hely több karakternek + Bármely + Hívó képe + Véletlenszerű + Üzenet + Kezdő- és zárolt képernyő + Alapvető + Nem lehetséges + Létrehozás dátuma + Vágás + Engedély megtagadva + Lehetséges felhasználás + Kezdőképernyő + Üzenetek + Kész + Nem lehet átnevezni + E-mail + Ismeretlen + Törölve + Nem menthető + Írja be a nevet + Ne jelenjen meg ismét + Töröl + Mégse + Elérte a karakterek maximális számát (%d) + Számláló + Nyomtatás + A bejegyzés üres + Elérte a karakterek maximális számát (%d) + Hangulatjelek használata + Már van %s nevű fájl + Betöltés... + Kijelző + SD-kártya eltávolítva + Körbevág + Diavetítés + Hosszúság + Hosszúság + Egyéni + Törlés sikertelen + A fájltípus\nnem támogatott + Megosztás + Nagyítás + Másol + Fájl helye + Már van ilyen név + Végrehajt + Helyek + Befejez + Idő + Szélesség + Összes album + Típus + Egyebek + Kezdőképernyő háttere + Mégse + Galéria + Méret + Hozzáadva + Képek + Ismétlés + Név + Zárolt képernyő háttere + Ne küldje el + Felbontás + Formázás + Hely + Érvénytelen képfájl + Már létezik. Felülírja? + Megosztás + Továbbítás + Összesített idő + Hely + A fájltípus\nnem támogatott + Szélesség + Fájlnév + Az áthelyezés sikertelen + Beállít, mint + A kezdőképernyő és a zárolt képernyő hátterének beállítása + Kezdő- és zárolt képernyő háttere + Részletek + Név módosítása + Lehetséges + Fájlformátum + Áthelyez + Nem törölhető + Eltávolít + Intervallum + Már létezik + Képernyő lezárása + Kész + A mentés nem sikerült + nincs adat + diff --git a/res/hye-AM.xml b/res/hye-AM.xml new file mode 100644 index 0000000..bc12c9e --- /dev/null +++ b/res/hye-AM.xml @@ -0,0 +1,99 @@ + + + + Հասել եք նիշերի առավելագույն քանակին + Ցանկացած + Զանգահարողի պատկեր + Պատահական + Հաղորդագրություն + Հիմնական և կողպված էկրաններ + Հիմնական + Անհնար է + Ստեղծման ամսաթիվը + Խուզել + Թույլտվությունը մերժվեց + Հասանելի օգտվողներ + Աշխատասեղան + Հղրդգրթ + Պատրաստ + Հնարավոր չէ վերանվանել + Էլ.փոստ + Անհայտ + Ջնջված է + Անհնար է պահել + Մուտքագրեք անունը + Չցուցադրել կրկին + Ջնջել + Չեղարկել + Հասել է նիշերի առավելագույն քանակին (%d) + Քանակ + Տպել + Գրառումը դատարկ է + Հասել է նիշերի առավելագույն քանակին (%d) + Օգտագործել շարժում + %s-ն արդեն գոյություն ունի + Բեռնում է... + Էկրան + SD քարտը հեռացված է + Խուզել + Սլայդ շոու + Երկայնք + Երկայնք + Անհատ + Ջնջումը ձախողվեց + Ֆայլի չսատարվող տեսակ + Համատեղ օգտագործում + Մասշտաբ + Պատճենել + Ֆայլի տեղը + Նույն անունն արդեն օգտագործվում է + Կատարել + Տեղեր + Ավարտ + Ժամանակ + Լայնք + Բոլոր ալբոմները + Տեսակ + Ավելին + Հիմն. էկրանի պաստառ + Չեղարկել + Պատկերասրահ + Չափս + Ավելացված է + Պատկերներ + Կրկնել + Անուն + Կողպված էկրանի պաստառ + Չուղարկել + Լուծաչափ + Ձևաչափել + Գտնվելու վայր + Անվավեր պատկերի ֆայլ + Արդեն գոյություն ունի: Վերագրանցե՞լ + Համօգտագործել հետևյալի միջոցով՝ + Փոխանցում + Կուտակված ժամանակը + Գտնվելու վայր + Անհամատեղելի\nֆայլի տեսակ + Լայնք + Ֆայլի անուն + Տեղափոխումը ձախողվեց + Նշանակել որպես + Դնել պաստառ հիմնական էկրանի և կողպված էկրանի համար + Հիմնական և կողպված էկրանի պաստառ + Մանրամասներ + Փոխել անունը + Հնարավոր + Նիշքի ձեւաչափը + Տեղափոխել + Անհար է ջնջել + Հեռացնել + Դադար + Արդեն գոյություն ունի + Կողպել էկրանը + Կատարված է + Պահպանումը ձախողվեց + Կիրառելի չէ + diff --git a/res/isl-IS.xml b/res/isl-IS.xml new file mode 100644 index 0000000..aeffd25 --- /dev/null +++ b/res/isl-IS.xml @@ -0,0 +1,99 @@ + + + + Hámarksfjölda stafa hefur verið náð + Hvað sem er + Mynd af viðmælanda + Af handahófi + Skilaboð + Heima- og lásskjáir + Venjulegt + Ekki hægt + Dagsetning búin til + Snyrta + Leyfi var hafnað + Tiltæk notkun + Heimaskjár + Skilaboð + Lokið + Mistókst að breyta heiti + Tölvupóstur + Óþekkt + Eytt + Ekki er hægt að vista + Rita nafn + Ekki birta aftur + Eyða + Hætta við + Hámarkfjölda stafa (%d) hefur verið náð + Fjöldi + Prenta + Færsla er tóm + Hámarkfjölda stafa (%d) hefur verið náð + Nota hreyfingu + %s er til fyrir + Hleð... + Skjár + SD-kortið er ekki í símanum + Skera af + Glærusýning + Lengdargráða + Lengdargráða + Stakt + Ekki tókst að eyða + Óstutt skrársnið + Samnýta + Aðdráttur + Afrita + Staðsetning skráar + Þetta heiti er þegar í notkun + Framkvæma + Staðsetningar + Ljúka + Tími + Breiddargráða + Allar plötur + Tegund + Meira + Veggfóður á heimaskjá + Hætta við + Gallerí + Stærð + Bætt við + Myndir + Endurtaka + Heiti + Læsa veggfóðri á skjá + Ekki senda + Upplausn + Snið + Staðsetning + Ógild myndskrá + Er þegar til. Viltu skrifa yfir? + Samnýta um + Framsending + Uppsafnaður tími + Staðsetning + Óstudd skráargerð + Breiddargráða + Skrárheiti + Ekki tókst að flytja + Setja sem + Velja veggfóður fyrir heimaskjá og læsa skjá + Veggfóður heima- og lásskjás + Upplýsingar + Breyta heiti + Mögulegt + Skráarsnið + Færa + Það er ekki hægt að eyða + Fjarlægja + Bil + Er þegar til + Læsa skjá + Lokið + Mistókst að vista + Óþekkt + diff --git a/res/ita-IT.xml b/res/ita-IT.xml new file mode 100644 index 0000000..d6b68ea --- /dev/null +++ b/res/ita-IT.xml @@ -0,0 +1,99 @@ + + + + Raggiunto numero massimo di caratteri + Qualsiasi + Immagine chiamante + Casuale + Messaggio + Schermata Home e di blocco + Di base + Impossibile + Data creazione + Ritaglia + Permesso negato + Usi disponibili + Schermata Home + Messaggi + Fatto + Impossibile rinominare + E-mail + Sconosciuto + Eliminato/i + Impossibile salvare + Inserisci nome + Non mostrare più + Elimina + Annulla + Raggiunto numero massimo di caratteri (%d) + Conteggio + Stampa + Voce vuota + Raggiunto numero massimo di caratteri (%d) + Sensore di movimento + %s esiste già + Caricamento... + Schermo + Scheda SD rimossa + Ritaglia + Presentazione + Longitudine + Longitudine + Individuale + Eliminazione non riuscita + Tipo file non supportato + Condividi + Zoom + Copia + Posizione file + Stesso nome già in uso + Esegui + Posizioni + Fine + Ora + Latitudine + Tutti gli album + Tipo + Altro + Sfondo schermata Home + Annulla + Galleria + Dimensioni + Aggiunto + Immagini + Ripeti + Nome + Blocca sfondo schermo + Non inviare + Risoluzione + Formatta + Posizione + File immagine non valido + Già esistente. Sovrascrivere? + Condividi con + Inoltro + Tempo accumulato + Posizione + Tipo file\nnon supportato + Latitudine + Nome file + Spostamento non riuscito + Imposta come + Imposta sfondo per schermata iniziale e schermo bloccato + Sfondo schermata iniziale e blocco + Dettagli + Cambia nome + Possibile + Formato file + Sposta + Impossibile eliminare + Rimuovi + Intervallo + Già esiste + Schermata di blocco + Fatto + Errore salvataggio + N/D + diff --git a/res/jpn-JP.xml b/res/jpn-JP.xml new file mode 100644 index 0000000..0873e54 --- /dev/null +++ b/res/jpn-JP.xml @@ -0,0 +1,99 @@ + + + + 最大文字数に達しました。 + どれか + 発信者画像 + ランダム + メッセージ + ホーム画面とロック画面 + 標準 + 不可 + 作成日付 + トリミング + 承認が拒否されました。 + 使用可能 + ホーム画面 + メッセージ + 完了 + 名前を変更できません。 + Eメール + 不明 + 削除しました。 + 保存できません。 + 名前を入力してください。 + 今後表示しない + 削除 + キャンセル + 最大文字数(%d)に達しました。 + 回数 + 印刷 + 入力されていません。 + 最大文字数(%d)に達しました。 + モーションを使用 + %sは既に存在します。 + 読み込み中... + 画面 + 外部SDカードが取り外されました。 + トリミング + スライドショー + 経度 + 経度 + 個人 + 削除できませんでした。 + 未対応のファイルです。 + 共有 + ズーム + コピー + ファイルの場所 + 同じ名前が既に使用されています + 実行 + 場所 + 終了 + 時刻 + 緯度 + 全アルバム + タイプ + その他 + ホーム画面の壁紙 + キャンセル + ギャラリー + サイズ + 追加しました。 + 画像 + 繰り返し + 名前 + 画面ロック時の壁紙 + 送出しない + 解像度 + ファイルタイプ + 保存先 + 画像​ファイル​が​無効​です + 同名ファイルがあります。上書きしますか? + 共有 + 転送 + 累積時間 + 場所 + 未対応の\nファイル形式です。 + 緯度 + ファイル名 + 移動に失敗しました。 + 登録 + ホーム画面やロック画面の壁紙を設定 + ホーム画面/ロック画面用壁紙 + 詳細 + 名前を変更 + 可能 + ファイル形式 + 移動 + 削除できません。 + 削除 + 間隔 + 既に登録されています。 + ロック画面 + 完了 + 保存に失敗しました。 + なし + diff --git a/res/kat-GE.xml b/res/kat-GE.xml new file mode 100644 index 0000000..d6a8a30 --- /dev/null +++ b/res/kat-GE.xml @@ -0,0 +1,99 @@ + + + + მიღწეულია სიმბოლოების მაქსიმალური რაოდენობა + ნებისმიერი + აბონენტის სურათი + შემთხვევითი + შეტყობინება + საწყისი და დაბლოკილი ეკრანები + ძირითადი + შეუძლებელია + შექმნის თარიღი + დარეგულირება + ნებართვა უარყოფილია + დასაშვები გამოყენება + საწყისი ეკრანი + შეტყობინებები + შესრულდა + სახელს ვერ შეცვლით + ელ-ფოსტა + უცნობი + წაშლილია + ვერ შეინახავთ + ჩაწერეთ სახელი + აღარ მაჩვენო + წაშლა + გაუქმება + მიღწეულია სიმბოლოების მაქსიმალური რაოდენობა (%d) + დათვლა + ამობეჭდვა + ცარიელი ჩანაწ. + მიღწეულია სიმბოლოების მაქსიმალური რაოდენობა (%d) + მოძრაობის გამოყენება + %s უკვე არსებობს + იტვირთება... + ჩვენება + SD ბარათი ამოღებულია + ამოჭრა + სლაიდშოუ + გრძედი + გრძედი + ინდივიდუალური + წაშლა არ მოხერხდა + ფაილის ტიპი გაუთვალისწინებელია + გაზიარება + მასშტაბი + ასლი + ფაილის ადგილი + იგივე სახელი უკვე გამოყენებულია + შესრულება + ლოკაციები + დასასრული + დრო + განედი + ყველა ალბომი + ტიპი + სხვა + საწყისი ეკრანის ფონი + გაუქმება + გალერეა + ზომა + დამატებულია + გამოსახულებები + გამეორება + სახელი + ფონის დაბლოკვა + არ გაიგზავნოს + გარჩევადობა + ფორმატი + ადგილმდებარეობა + გრაფიკული ფაილი არასწორია + უკვე არსებობს. გადავაწერო? + გაზიარების მეთოდია + გადამისამართება + საერთო დრო + ადგილმდებ. + ფაილის ტიპი\nგაუთვალისწინებელია + განედი + ფაილის სახელი + გადატანა ვერ შესრულდა + დაყენება + დააყენეთ ფონი საწყის ეკრანზე და დაბლოკეთ ეკრანი + საწყისი და დაბლოკილი ეკრანის ფონი + დეტალები + სახელის შეცვლა + შესაძლო + ფაილის ფორმატი + გადატანა + წაშლა შეუძლებელია + წაშლა + ინტერვალი + უკვე არის + ეკრანის დაბლოკვა + შესრულებულია + ვერ შეინახა + არ არის + diff --git a/res/kaz-KZ.xml b/res/kaz-KZ.xml new file mode 100644 index 0000000..33f7cf2 --- /dev/null +++ b/res/kaz-KZ.xml @@ -0,0 +1,99 @@ + + + + Таңбалардың ен көп саны артты + Кез келген + Фотоанықтаушы + Еркін + Хабарлама + Бастапқы және құлып экрандары + Негізгі + Мүмкін емес + Күн белгіленген + Жақтау + Рұқсаттан бас тартылды + Пайдалануға жарамды + Бейнебеттің өзіндік беті + Хабарламалар + Дайын + Атын өзгерту мүмкін емес + Эл. пошта + Белгісіз + Жойылды + Сақтау мүмкін емес + Атын енгізіңіз + Қайта көрсетпеңіз + Жою + Тоқтату + Ең көп таңбалар санына (%d) жетті + Санау + Басып шығару + Енгізбе бос + Ең көп таңбалар санына (%d) жетті + Қозғалыс пайдалану + %s бар + Жазылуда... + Дисплей + SD картасы алынды + Қию + Слайд-шоу + Ұзақтық + Ұзақтық + Жеке + Жою үстінде үзіліп кетті + Қолдаусыз файл түрі + Байланысқа жол + Ауқымы + Көшіру + Файл орны + Мұндай атау қолданыста бар + Орындау + Орындар + Соңы + Уақыт + Кеңділік + Барлық альбомдар + Түрі + Басқалар + Баст. экран түсқағазы + Тоқтату + Галерея + Өлшемі + Қосылды + Суреттер + Қайталау + Аты + Экран түсқағ. құлып-у + Жібермеу + Шешім + Форматтау + Орналасу орны + Қате кескін файлы + Бар. Қайта жазу керек пе? + Бөлісу + Басқа біреуге жіберу + Көп уақыт + Орналасу орны + Қолданылмайтын\nфайл түрі + Кеңділік + Файл аты + Орналастырылмады + Орнату + Бастапқы экранға түсқағаз орнату және экранды құлыптау + Бастапқы және құлып экран түсқағазы + Өзгешеліктері + Атын өзгерту + Мүмкін + Файл пішімі + Орналастыру + Жою мүмкін емес + Жоғалту + Аралық + Қолданыста бар + Экранды құлыптау + Аяқталды + Сақтау сәтсіз + Қол жетімді емес + diff --git a/res/kor-KR.xml b/res/kor-KR.xml new file mode 100644 index 0000000..af5f055 --- /dev/null +++ b/res/kor-KR.xml @@ -0,0 +1,99 @@ + + + + 입력 가능한 최대 글자수를 초과하였습니다 + 모든 종류 + 발신자 이미지 + 랜덤 + 메시지 + 홈 화면 및 잠금화면 + 기본 + 불가능 + 생성 날짜 + 잘라내기 + 허가가 거부되었습니다 + 사용 가능 + 홈 화면 + 메시지 + 완료 + 이름을 변경할 수 없습니다 + 이메일 + 알 수 없음 + 삭제되었습니다 + 저장할 수 없습니다 + 이름을 입력하세요 + 다시 표시 안 함 + 삭제 + 취소 + 최대 글자 수(%d개)를 초과하였습니다 + 횟수 + 인쇄 + 입력된 내용이 없습니다 + 최대 글자 수(%d개)를 초과하였습니다 + 모션 기능 사용 + %s이(가) 저장되어 있습니다 + 로딩 중... + 화면 + SD 카드가 제거되었습니다 + 잘라내기 + 슬라이드쇼 + 경도 + 경도 + 개인 + 삭제하지 못하였습니다 + 지원되지 않는 파일 형식입니다 + 공유 + 확대/축소 + 복사 + 파일 위치 + 사용 중인 이름입니다 + 실행 + 위치 + 종료 + 시간 + 위도 + 모든 앨범 + 형식 + 더보기 + 홈 화면 배경화면 + 취소 + 갤러리 + 크기 + 추가되었습니다 + 이미지 + 반복 + 이름 + 잠금화면 + 보내지 않음 + 해상도 + 포맷 + 위치 + 이미지 파일이 바르지 않습니다 + 사용 중인 이름입니다. 덮어쓸까요? + 공유 + 전송 + 사용 시간 + 위치 + 지원되지 않는 파일 형식입니다 + 위도 + 파일 이름 + 이동하지 못하였습니다 + 설정 + 홈 화면 및 잠금화면의 배경화면 설정 + 홈 및 잠금화면 배경 + 상세 정보 + 이름 변경 + 가능 + 파일 형식 + 이동 + 삭제할 수 없습니다 + 제거 + 간격 + 이미 저장되어 있습니다 + 잠금화면 + 완료 + 저장하지 못하였습니다 + N/A + diff --git a/res/lav-LV.xml b/res/lav-LV.xml new file mode 100644 index 0000000..91af516 --- /dev/null +++ b/res/lav-LV.xml @@ -0,0 +1,99 @@ + + + + Sasniegts maksimālais rakstzīmju skaits + Jebkurš + Zvanītāja attēls + Nejaušā secībā + Ziņa + Sākuma un bloķēšanas ekrāni + Pamata + Nav iespējams + Izveidošanas datums + Apgriezt + Atļauja liegta + Atlikušās lietošanas reizes + Sākuma ekrāns + Ziņas + Gatavs + Nevar pārdēvēt + E-pasts + Nezināms + Izdzēsts + Nevar saglabāt + Ievadiet vārdu + Nerādīt vēlreiz + Dzēst + Atcelt + Sasniegts maksimālais rakstzīmju skaits (%d) + Skaits + Drukāt + Ieraksts nav norādīts + Sasniegts maksimālais rakstzīmju skaits (%d) + Lietot kustību + %s jau pastāv + Ielādē... + Displejs + SD karte ir izņemta + Apgriezt + Slaidrāde + Garums + Garums + Individuāls + Neizdevās izdzēst + Neatbalstīts faila veids + Koplietot + Tālummaiņa + Kopēt + Faila atrašanās vieta + Šāds nosaukums jau tiek lietots + Izpildīt + Atrašanās vietas + Beigt + Laiks + Platums + Visi albumi + Veids + Citi + Sāk.ekrān.fona attēls + Atcelt + Galerija + Lielums + Pievienots + Attēli + Atkārtot + Nosaukums + Bloķēt ekr. fona att. + Nesūtīt + Izšķirtspēja + Formatēt + Atrašanās vieta + Nederīgs attēla fails + Jau pastāv. Vai pārrakstīt? + Koplietot, izmantojot + Pārsūtīšana + Uzkrāts laiks + Atrašanās vieta + Neatbalstīts\nfaila veids + Platums + Faila nosaukums + Pārvietošana neizdevās + Iestatīt kā + Iestatīt sākuma ekrāna fona attēlu un bloķēt ekrānu + Sākuma un bloķēšanas ekrāna fona attēls + Dati + Mainīt vārdu + Iespējams + Faila formāts + Pārvietot + Nevar izdzēst + Noņemt + Intervāls + Jau pastāv + Bloķēšanas ekrāns + Gatavs + Saglabāšana neizdevās + Nav pieejams + diff --git a/res/lit-LT.xml b/res/lit-LT.xml new file mode 100644 index 0000000..28e4c03 --- /dev/null +++ b/res/lit-LT.xml @@ -0,0 +1,99 @@ + + + + Pasiektas didžiausias simbolių skaičius + Bet kuris + Skambintojo vaizdas + Atsitiktinis + Žinutė + Pradžios ir užrakinimo ekranai + Pagrindinis + Neįmanoma + Sukūrimo data + Nukirpti + Leidimas atmestas + Galimi panaudojimai + Pradžios ekranas + Žinutės + Atlikta + Neįmanoma pervardinti + El. paštas + Nežinomas + Ištrinta + Neįmanoma įrašyti + Įvesti vardą + Daugiau nerodyti + Trinti + Atšaukti + Pasiektas didžiausias simbolių skaičius (%d) + Skaičiuoti + Spausdinti + Įrašas tuščias + Pasiektas didžiausias simbolių skaičius (%d) + Naudoti judesį + %s jau yra + Įkeliama... + Ekranas + Išimta SD kortelė + Apkarpyti + Skaidrių demonstravimas + Ilguma + Ilguma + Atskiras + Ištrinti nepavyko + Nepalaikomas failo tipas + Dalytis + Mastelio keitimas + Kopijuoti + Failo vieta + Toks pavadinimas jau yra + Vykdyti + Vietos + Baigti + Laikas + Platuma + Visi albumai + Tipas + Daugiau + Pradžios ekrano fonas + Atšaukti + Galerija + Dydis + Pridėta + Vaizdai + Kartoti + Pavadinimas + Ekrano užrakin. fonas + Nesiųsti + Raiška + Formatas + Vieta + Neteisingas paveikslėlio failas + Jau yra. Perrašyti? + Bendrinti per + Persiuntimas + Apskaičiuotas laikas + Vieta + Nepalaikomo\ntipo failas + Platuma + Failo pavadinimas + Perkelti nepavyko + Nustatyti kaip + Nustatyti pradžios ir užrakinimo ekrano foną + Pradžios ir užrakinimo ekranų fonas + Išsami informacija + Keisti vardą + Įmanoma + Failo formatas + Perkelti + Ištrinti nepavyko + Šalinti + Intervalas + Jau yra + Užrakinimo ekranas + Atlikta + Išsaugoti nepavyko + Netaikoma + diff --git a/res/mkd-MK.xml b/res/mkd-MK.xml new file mode 100644 index 0000000..a0ae42b --- /dev/null +++ b/res/mkd-MK.xml @@ -0,0 +1,99 @@ + + + + Достигнат е максималниот број знаци + Кој било + Слика за повикувач + Произволно + Порака + Почетен и екрани за заклучување + Основно + Невозможно + Датум на создавање + Отсечи + Нема дозвола + Можност за употреба + Почетен екран + Пораки + Готово + Не може да се преименува + Е-пошта + Непознато + Избришано + Не може да се меморира + Внеси име + Не прикажувај веќе + Избриши + Откажи + Достигнат е максималниот број знаци (%d) + Број + Печати + Записот е празен + Достигнат е максималниот број знаци (%d) + Користи движења + %s веќе постои + Активирање... + Екран + SD-картичката е извадена + Потсечи + Слајдови + Географска должина + Географска должина + Индивидуално + Неуспешно бришење + Неподдржан тип на фајл + Сподели + Зголемено + Копирај + Локација на фајлот + Истото име веќе се користи + Изврши + Локации + Крај + Час + Географска широчина + Сите албуми + Тип + Повеќе + Заднина на осн. екран + Откажи + Галерија + Големина + Додадено + Слики + Повторување + Име + Закл.задн. на екранот + Не праќај + Резолуција + Формат + Локација + Неважечки сликовен фајл + Веќе постои. Пресними? + Подели преку + Препраќање + Вкупно траење + Локација + Неподдржан\nвид фајл + Географска широчина + Име на фајлот + Неуспешно преместување + Постави како + Постави заднина за основниот екран и заклучи екран + Заднина на почетниот и екранот за заклучување + Детали + Смени име + Возможно + Формат на фајлот + Премести + Не може да се избрише + Отстрани + Интервал + Веќе постои + Заклучување на екранот + Извршено + Неуспешно снимање + Нема + diff --git a/res/nld-NL.xml b/res/nld-NL.xml new file mode 100644 index 0000000..8ec0c10 --- /dev/null +++ b/res/nld-NL.xml @@ -0,0 +1,99 @@ + + + + Maximumaantal tekens bereikt + Alle + Afbeelding beller + Willekeurig + Bericht + Start- en vergrendelscherm + Basis + Niet mogelijk + Datum gemaakt + Bijsnijden + Toestemming geweigerd + Aantal keer dat het gebruikt mag worden + Startscherm + Berichten + Gereed + Kan de naam niet wijzigen + E-mail + Onbekend + Verwijderd + Opslaan niet mogelijk + Naam invoeren + Niet meer tonen + Wissen + Annuleren + Maximumaantal tekens (%d) bereikt + Aantal + Afdrukken + Geen gegevens + Maximumaantal tekens (%d) bereikt + Beweging gebruiken + %s bestaat al + Laden... + Display + SD-kaart verwijderd + Bijsnijden + Diapresentatie + Lengtegraad + Lengtegraad + Individueel + Verwijderen mislukt + Niet-ondersteund bestandstype + Delen + Zoomen + Kopiëren + Bestandslocatie + Naam is al in gebruik + Uitvoeren + Locaties + Stop + Tijd + Breedtegraad + Alle albums + Type + Meer + Achtergrond startscherm + Annuleren + Galerij + Grootte + Toegevoegd + Afbeeldingen + Herhalen + Naam + Achtergrond vergrendelscherm + Niet verzenden + Resolutie + Formatteren + Locatie + Ongeldig afbeeldingsbestand + Bestaat al. Overschrijven? + Delen via + Doorsturen + Totale tijd + Locatie + Niet-ondersteund\nbestandstype + Breedtegraad + Bestandsnaam + Verplaatsen is mislukt + Instellen als + Achtergrond instellen voor startscherm en vergrendelscherm + Achtergrond voor start- en vergrendelscherm + Gegevens + Naam wijzigen + Mogelijk + Bestandsindeling + Verplaatsen + Kan niet verwijderen + Verwijderen + Interval + Bestaat al + Vergrendelscherm + Gereed + Opslaan mislukt + N.v.t. + diff --git a/res/nob-NO.xml b/res/nob-NO.xml new file mode 100644 index 0000000..4b78c55 --- /dev/null +++ b/res/nob-NO.xml @@ -0,0 +1,99 @@ + + + + Nådd maksimalt antall tegn + Alle + Anropsbilde + Tilfeldig + Melding + Startskjerm og skjermlås + Grunnleggende + Umulig + Opprettet dato + Beskjær + Tillatelse avslått + Kan brukes antall ganger + Startskjerm + Meldinger + Utført + Kan ikke gi nytt navn + E-post + Ukjent + Slettet + Kan ikke lagre + Angi navn + Ikke vis igjen + Slett + Avbryt + Maksimalt antall tegn (%d) er nådd + Antall + Skriv ut + Oppføringen er tom + Maksimalt antall tegn (%d) er nådd + Bruk bevegelse + %s finnes allerede + Åpner... + Skjerm + SD-kort fjernet + Beskjær + Bildefremvisning + Lengdegrad + Lengdegrad + Individuell + Kunne ikke slette + Filtypen støttes ikke + Del + Zoom + Kopier + Filplassering + Samme navn allerede i bruk + Utfør + Plasseringer + Avslutt + Tid + Breddegrad + Alle album + Type + Mer + Startskjermbakgrunn + Avbryt + Galleri + Størrelse + Lagt til + Bilder + Gjenta + Navn + Skjermlåsbakgrunn + Ikke send + Oppløsning + Formater + Sted + Ugyldig bildefil + Finnes allerede. Vil du overskrive? + Del via + Videresending + Akkumulert tid + Sted + Filtypen\nstøttes ikke + Breddegrad + Filnavn + Flyttingen mislyktes + Bruk som + Angi bakgrunn for startskjerm og skjermlås + Startskjerm- og skjermlåsbakgrunn + Detaljer + Endre navn + Mulig + Filformat + Flytt + Kan ikke slette + Fjern + Intervall + Finnes allerede + Skjermlås + Utført + Kunne ikke lagre + Utilgjengelig + diff --git a/res/pol-PL.xml b/res/pol-PL.xml new file mode 100644 index 0000000..4fc3f33 --- /dev/null +++ b/res/pol-PL.xml @@ -0,0 +1,99 @@ + + + + Osiągnięto maksymalną liczbę znaków + Dowolny + Zdjęcie kontaktu + Losowo + Wiadomość + Ekran startowy i blokowania + Podstawowy + Niemożliwe + Data utworzenia + Przytnij + Nie udzielono zezwolenia + Dostępne zastosowania + Ekran startowy + Wiadomości + Gotowe + Nie można zmienić nazwy + E-mail + Nieznana + Usunięto + Nie można zapisać + Wpisz nazwę + Nie wyświetlaj ponownie + Usuń + Anuluj + Osiągnięto maksymalną liczbę znaków (%d) + Liczba + Drukuj + Wpis jest pusty + Osiągnięto maksymalną liczbę znaków (%d) + Użycie ruchu + %s już istnieje + Ładuję... + Wyświetlacz + Wyjęto kartę pamięci + Przytnij + Pokaz slajdów + Długość geogr. + Długość geogr. + Osobiste + Błąd usuwania + Nieobsługiwany typ pliku + Udostępnij + Powiększenie + Kopiuj + Lokalizacja pliku + Ta sama nazwa jest już w użyciu + Wykonaj + Lokalizacje + Koniec + Godzina + Szerokość geogr. + Wszystkie albumy + Typ + Więcej + Tapeta ekranu start. + Anuluj + Galeria + Rozmiar + Dodano + Obrazy + Powtórz + Nazwa + Tapeta ekranu blokady + Nie wysyłaj + Rozdzielczość + Formatuj + Miejsce + Nieprawidłowy plik obrazu + Już istnieje. Zamienić? + Udostępnij przez + Przesyłanie + Łączny czas połączeń + Miejsce + Nieobsługiwany\ntyp pliku + Szerokość geogr. + Nazwa pliku + Błąd przenoszenia + Ustaw jako + Ustaw tapetę ekranu startowego i ekranu blokady + Tapeta ekranu startowego i ekranu blokady + Szczegóły + Zmień nazwę + Możliwe + Format pliku + Przenieś + Nie można usunąć + Usuń + Okres + Już istnieje + Ekran blokady + Gotowe + Błąd zapisywania + Brak + diff --git a/res/por-BR.xml b/res/por-BR.xml new file mode 100644 index 0000000..dfd28ff --- /dev/null +++ b/res/por-BR.xml @@ -0,0 +1,99 @@ + + + + Número máximo de caracteres atingido + Qualquer + ID de chamada + Aleatório + Mensagem + Tela de início e de bloqueio + Básico + Impossível + Data de criação + Cortar + Permissão negada + Utilizações disponíveis + Tela principal + Mensagens + Concluído + Impossível renomear + E-mail + Desconhecido + Apagado + Não foi possível salvar + Inserir nome + Não mostrar novamente + Apagar + Cancelar + Número máximo de caracteres (%d) atingido + Contagem + Imprimir + Entrada vazia + Número máximo de caracteres (%d) atingido + Utilizar movimento + %s já existente + Carregando... + Visor + Cartão de memória removido + Cortar + Exibição de slides + Longitude + Longitude + Individual + Erro ao apagar + Tipo de arquivo não suportado + Compartilhar + Zoom + Copiar + Localização de arquivo + O mesmo nome já está sendo utilizado + Executar + Localizações + Encerrar + Hora + Latitude + Todos os álbuns + Tipo + Mais + Fundo da tela princ. + Cancelar + Galeria + Tamanho + Adicionado + Imagens + Repetir + Nome + Fundo da tela de bloq. + Não enviar + Resolução + Formatar + Local + Arquivo de imagem inválido + Já existe. Substituir? + Compartilhar via + Encaminhamento + Tempo acumulado + Local + Tipo de arquivo\nnão suportado + Latitude + Nome do arquivo + Erro ao mover + Definir como + Definir fundo da tela principal e bloqueio de tela + Papel de parede da tela Início e de bloqueio + Detalhes + Alterar nome + Possível + Formato de arquivo + Mover + Impossível apagar + Remover + Intervalo + Já existe + Tela de bloqueio + Concluído + Erro ao salvar + N/D + diff --git a/res/por-PT.xml b/res/por-PT.xml new file mode 100644 index 0000000..41675b7 --- /dev/null +++ b/res/por-PT.xml @@ -0,0 +1,99 @@ + + + + Número máximo de caracteres atingido. + Qualquer + Imagem do chamador + Aleatório + Mensagem + Ecrãs principal e de bloqueio + Básico + Impossível + Data criada + Recortar + Permissão negada + Utilizações disponíveis + Ecrã principal + Mensagem + Concluído + Impossível mudar nome + E-mail + Desconhecido + Eliminado + Não foi possível guardar + Introduzir nome + Não mostrar novamente + Eliminar + Cancelar + Número máximo de caracteres (%d) atingido + Contagem + Imprimir + Entrada vazia + Número máximo de caracteres (%d) atingido + Utilizar movimento + %s já existente + A carregar... + Visor + Cartão SD removido + Recortar + Apresentação de slides + Longitude + Longitude + Individual + Falha ao apagar + Tipo de ficheiro não suportado + Partilhar + Zoom + Copiar + Localização de ficheiro + Já está a ser utilizado o mesmo nome + Executar + Localizações + Terminar + Hora + Latitude + Todos os álbuns + Tipo + Mais + Fundo do ecrã princ. + Cancelar + Galeria + Tamanho + Adicionado + Imagens + Repetir + Nome + Fundo ecrã bloqueio + Não enviar + Resolução + Formatar + Localização + Ficheiro de imagem inválido + Já existe. Substituir? + Partilhar via + Reencaminhar + Tempo acumulado + Localização + Tipo de ficheiro\nnão suportado + Latitude + Nome do ficheiro + Falha ao mover + Definir como + Definir fundo do ecrã principal e bloqueio do ecrã + Fundo do ecrã principal e ecrã bloqueado + Detalhes + Alterar nome + Possível + Formato de ficheiro + Mover + Impossível apagar. + Remover + Intervalo + Já existe + Ecrã bloqueado + Concluído + Falha ao gravar + N/A + diff --git a/res/ron-RO.xml b/res/ron-RO.xml new file mode 100644 index 0000000..7139e3d --- /dev/null +++ b/res/ron-RO.xml @@ -0,0 +1,99 @@ + + + + Adăugare la marcaje + Oricare + Imagine apelant + Aleatoriu + Mesaj + Ecrane de pornire şi de blocare + De bază + Imposibil + Data creării + Decupare + Permisiunea a fost refuzată + Utilizări disponibile + Ecran de pornire + Mesaje + Gata + Imposibil de redenumit + Email + Necunoscut + Şters + Eroare de salvare + Introduceţi numele + Nu se mai afişează + Ştergere + Anulare + Numărul maxim de caractere (%d) a fost atins + Contor + Imprimare + Locaţie liberă + Numărul maxim de caractere (%d) a fost atins + Utilizare mişcare + %s există deja + Încărcare... + Ecran + Cartela SD a fost eliminată + Tăiere + Expuneri diapozitive + Longitudine + Longitudine + Individual + Ştergerea nu a reuşit + Tip fişier neacceptat + Partajare + Panoramare + Copiere + Locaţie fişier + Acelaşi nume deja în uz + Executare + Locaţii + Terminare + Oră + Latitudine + Toate albumele + Tip + Mai multe + Fundal ecran pornire + Anulare + Galerie + Dimensiune + Adăugat + Imagini + Repetare + Nume + Bloc. fundal ec. por. + Nu se trimite + Rezoluţie + Format + Locaţie + Fişier de imagini nevalid + Există deja. Suprascrieţi? + Partajare prin + Redirecţionare + Timp cumulat + Locaţie + Tip fişier\nneacceptat + Latitudine + Nume fişier + Mutarea nu a reuşit + Setare ca + Setare fundal pentru ecran de pornire şi blocare ecran. + Fundal ecran de pornire şi de blocare + Detalii + Schimbare nume + Posibil + Format fişier + Mutare + Imposibil de şters + Eliminare + Interval + Există deja + Blocare ecran + Efectuat + Salvare nereuşită + Nedisponibil + diff --git a/res/rus-RU.xml b/res/rus-RU.xml new file mode 100644 index 0000000..1cd1c50 --- /dev/null +++ b/res/rus-RU.xml @@ -0,0 +1,99 @@ + + + + Достигнуто максимальное число символов + Любой + Фотоопределитель + Случайно + Сообщение + Главный экран и экран блокировки + Основной + Невозможно + Дата создания + Обрезать + Разрешение не получено + Доступно + Главный экран + Сообщения + Готово + Невозможно переименовать + E-mail + Неизвестно + Удалено + Невозможно сохранить + Введите имя + Не показывать снова + Удалить + Отмена + Достигнуто максимальное число символов (%d) + Количество + Печать + Пустая запись + Достигнуто максимальное число символов (%d) + Использовать движение + %s уже существует + Загрузка... + Дисплей + Карта памяти SD извлечена + Обрезать + Слайд-шоу + Долгота + Долгота + Индивидуальный + Сбой удаления + Неподдерживаемый тип файла + Поделиться + Масштаб + Копировать + Расположение файла + Имя уже используется + Запуск + Расположения + Завершить + Время + Широта + Все альбомы + Тип + Опции + Обои главного экрана + Отмена + Галерея + Размер + Добавлено + Картинки + Повторить + Имя + Экран блокировки + Не отправлять + Разрешение + Форматировать + Расположение + Недопустимый файл изображения + Уже существует. Перезаписать? + Отправить через + Пересылка + Суммарное время + Местоположение + Неподдерживаемый\nтип файла + Широта + Имя файла + Сбой перемещения + Установить как + Задайте обои для главного экрана и экрана блокировки + Обои для главного экрана и экрана блокировки + Свойства + Изменить имя + Возможно + Формат файла + Переместить + Невозможно удалить + Удалить + Интервал + Уже существует + Экран блокировки + Готово + Сбой сохранения + Н/Д + diff --git a/res/screen-density-xhigh/00_icon_more.png b/res/screen-density-xhigh/00_icon_more.png new file mode 100644 index 0000000..49a6d06 Binary files /dev/null and b/res/screen-density-xhigh/00_icon_more.png differ diff --git a/res/screen-density-xhigh/00_icon_more_press.png b/res/screen-density-xhigh/00_icon_more_press.png new file mode 100644 index 0000000..3a13509 Binary files /dev/null and b/res/screen-density-xhigh/00_icon_more_press.png differ diff --git a/res/screen-density-xhigh/T01_1_controlbar_icon_delete.png b/res/screen-density-xhigh/T01_1_controlbar_icon_delete.png new file mode 100644 index 0000000..c13897d Binary files /dev/null and b/res/screen-density-xhigh/T01_1_controlbar_icon_delete.png differ diff --git a/res/screen-density-xhigh/T01_1_controlbar_icon_detail.png b/res/screen-density-xhigh/T01_1_controlbar_icon_detail.png new file mode 100644 index 0000000..9e746c8 Binary files /dev/null and b/res/screen-density-xhigh/T01_1_controlbar_icon_detail.png differ diff --git a/res/screen-density-xhigh/T01_1_controlbar_icon_download.png b/res/screen-density-xhigh/T01_1_controlbar_icon_download.png new file mode 100644 index 0000000..e6c462d Binary files /dev/null and b/res/screen-density-xhigh/T01_1_controlbar_icon_download.png differ diff --git a/res/screen-density-xhigh/T01_1_controlbar_icon_save.png b/res/screen-density-xhigh/T01_1_controlbar_icon_save.png new file mode 100644 index 0000000..8930cfc Binary files /dev/null and b/res/screen-density-xhigh/T01_1_controlbar_icon_save.png differ diff --git a/res/screen-density-xhigh/T01_1_controlbar_icon_slide show.png b/res/screen-density-xhigh/T01_1_controlbar_icon_slide show.png new file mode 100644 index 0000000..8a1a05d Binary files /dev/null and b/res/screen-density-xhigh/T01_1_controlbar_icon_slide show.png differ diff --git a/res/screen-density-xhigh/T01_1_title_icon_set_as.png b/res/screen-density-xhigh/T01_1_title_icon_set_as.png new file mode 100644 index 0000000..72b74da Binary files /dev/null and b/res/screen-density-xhigh/T01_1_title_icon_set_as.png differ diff --git a/res/screen-density-xhigh/T01_1_title_icon_share.png b/res/screen-density-xhigh/T01_1_title_icon_share.png new file mode 100644 index 0000000..06567d1 Binary files /dev/null and b/res/screen-density-xhigh/T01_1_title_icon_share.png differ diff --git a/res/screen-density-xhigh/T01_Option tray_Details.png b/res/screen-density-xhigh/T01_Option tray_Details.png new file mode 100644 index 0000000..58c3022 Binary files /dev/null and b/res/screen-density-xhigh/T01_Option tray_Details.png differ diff --git a/res/screen-density-xhigh/T01_Option tray_Set as.png b/res/screen-density-xhigh/T01_Option tray_Set as.png new file mode 100644 index 0000000..a03f3d4 Binary files /dev/null and b/res/screen-density-xhigh/T01_Option tray_Set as.png differ diff --git a/res/screen-density-xhigh/T01_btn_SetCallerimage.png b/res/screen-density-xhigh/T01_btn_SetCallerimage.png new file mode 100644 index 0000000..adb15aa Binary files /dev/null and b/res/screen-density-xhigh/T01_btn_SetCallerimage.png differ diff --git a/res/screen-density-xhigh/T01_btn_SetCallerimage_press.png b/res/screen-density-xhigh/T01_btn_SetCallerimage_press.png new file mode 100644 index 0000000..4a59cfd Binary files /dev/null and b/res/screen-density-xhigh/T01_btn_SetCallerimage_press.png differ diff --git a/res/screen-density-xhigh/T01_btn_cancel.png b/res/screen-density-xhigh/T01_btn_cancel.png new file mode 100644 index 0000000..051ff04 Binary files /dev/null and b/res/screen-density-xhigh/T01_btn_cancel.png differ diff --git a/res/screen-density-xhigh/T01_btn_cancel_press.png b/res/screen-density-xhigh/T01_btn_cancel_press.png new file mode 100644 index 0000000..32f7e76 Binary files /dev/null and b/res/screen-density-xhigh/T01_btn_cancel_press.png differ diff --git a/res/screen-density-xhigh/T01_btn_circle_bg_normal.png b/res/screen-density-xhigh/T01_btn_circle_bg_normal.png new file mode 100644 index 0000000..981d624 Binary files /dev/null and b/res/screen-density-xhigh/T01_btn_circle_bg_normal.png differ diff --git a/res/screen-density-xhigh/T01_btn_circle_bg_press.png b/res/screen-density-xhigh/T01_btn_circle_bg_press.png new file mode 100644 index 0000000..bc5f8b2 Binary files /dev/null and b/res/screen-density-xhigh/T01_btn_circle_bg_press.png differ diff --git a/res/screen-density-xhigh/T01_button_rename.png b/res/screen-density-xhigh/T01_button_rename.png new file mode 100644 index 0000000..39c5de5 Binary files /dev/null and b/res/screen-density-xhigh/T01_button_rename.png differ diff --git a/res/screen-density-xhigh/T01_controlbar_icon_back.png b/res/screen-density-xhigh/T01_controlbar_icon_back.png new file mode 100644 index 0000000..d708747 Binary files /dev/null and b/res/screen-density-xhigh/T01_controlbar_icon_back.png differ diff --git a/res/screen-density-xhigh/T01_controlbar_icon_delete.png b/res/screen-density-xhigh/T01_controlbar_icon_delete.png new file mode 100644 index 0000000..2980bdc Binary files /dev/null and b/res/screen-density-xhigh/T01_controlbar_icon_delete.png differ diff --git a/res/screen-density-xhigh/T01_controlbar_icon_detail_close.png b/res/screen-density-xhigh/T01_controlbar_icon_detail_close.png new file mode 100644 index 0000000..aa9b28c Binary files /dev/null and b/res/screen-density-xhigh/T01_controlbar_icon_detail_close.png differ diff --git a/res/screen-density-xhigh/T01_controlbar_icon_share02.png b/res/screen-density-xhigh/T01_controlbar_icon_share02.png new file mode 100644 index 0000000..f58e87e Binary files /dev/null and b/res/screen-density-xhigh/T01_controlbar_icon_share02.png differ diff --git a/res/screen-density-xhigh/T01_controlbar_icon_slideshow.png b/res/screen-density-xhigh/T01_controlbar_icon_slideshow.png new file mode 100644 index 0000000..79c2ebd Binary files /dev/null and b/res/screen-density-xhigh/T01_controlbar_icon_slideshow.png differ diff --git a/res/screen-density-xhigh/T02_controlbar_icon_cancel.png b/res/screen-density-xhigh/T02_controlbar_icon_cancel.png new file mode 100644 index 0000000..6c3eac6 Binary files /dev/null and b/res/screen-density-xhigh/T02_controlbar_icon_cancel.png differ diff --git a/res/screen-density-xhigh/T0_1_2nd_title_bg.png b/res/screen-density-xhigh/T0_1_2nd_title_bg.png new file mode 100644 index 0000000..09fe23e Binary files /dev/null and b/res/screen-density-xhigh/T0_1_2nd_title_bg.png differ diff --git a/res/screen-density-xhigh/T0_1_btn_play.png b/res/screen-density-xhigh/T0_1_btn_play.png new file mode 100644 index 0000000..4c67b03 Binary files /dev/null and b/res/screen-density-xhigh/T0_1_btn_play.png differ diff --git a/res/screen-size-normal/IDL_FORM.xml b/res/screen-size-normal/IDL_FORM.xml new file mode 100644 index 0000000..eba4da5 --- /dev/null +++ b/res/screen-size-normal/IDL_FORM.xml @@ -0,0 +1,27 @@ + + + + + + 720 +
+ + + + +
+ + +
+
+ + +
+ +
diff --git a/res/slk-SK.xml b/res/slk-SK.xml new file mode 100644 index 0000000..6a3f34e --- /dev/null +++ b/res/slk-SK.xml @@ -0,0 +1,99 @@ + + + + Bol dosiahnutý maximálny počet znakov + Všetko + Obrázok volajúceho + Náhodne + Správa + Domovská obrazovka a zamknutá obrazovka + Základný + Nemožné + Dátum vytvorenia + Orezať + Povolenie odmietnuté + Počet použití k dispozícii + Úvodná obrazovka + Správy + Hotovo + Nedá sa premenovať + E-mail + Neznáme + Odstránené + Nedá sa uložiť. + Zadať meno + Už nezobrazovať + Odstrániť + Zrušiť + Dosiahol sa maximálny počet znakov (%d) + Počet + Tlač + Prázdna položka + Dosiahol sa maximálny počet znakov (%d) + Použiť pohyb + %s už existuje + Načítava sa... + Displej + Karta SD je odstránená + Orezať + Prezentácia + Zemepisná dĺžka + Zemepisná dĺžka + Jednotlivé + Vymazanie sa nepodarilo + Nepodporovaný typ súboru + Zdieľať + Zoom + Kopírovať + Umiestnenie súboru + Rovnaký názov sa už používa + Vykonať + Umiestnenia + Koniec + Čas + Zemepisná šírka + Všetky albumy + Typ + Ďalšie + Tapeta úv. obrazovky + Zrušiť + Galéria + Veľkosť + Pridané + Obrázky + Opakovať + Meno + Tapeta uzamk. obraz. + Neodoslať + Rozlíšenie + Formát + Miesto + Neplatný súbor s obrázkom + Už existuje. Prepísať? + Zdieľať cez + Preposlanie + Akumulovaný čas + Miesto + Nepodporovaný\ntyp súboru + Zemepisná šírka + Názov súboru + Presunutie sa nepodarilo + Nastaviť ako + Nastaviť tapetu úvodnej obrazovky a uzamknúť obrazovku + Tapeta domovskej a zamknutej obrazovky + Podrobnosti + Zmeniť názov + Možné + Formát súboru + Presunúť + Nedá sa odstrániť + Odstrániť + Interval + Už existuje + Uzamknúť obrazovku + Hotovo + Uloženie sa nepodarilo + Nedá sa použiť + diff --git a/res/slv-SI.xml b/res/slv-SI.xml new file mode 100644 index 0000000..5477af3 --- /dev/null +++ b/res/slv-SI.xml @@ -0,0 +1,99 @@ + + + + Doseženo je največje dovoljeno število znakov + Karkoli + Slika klicatelja + Naključno + Sporočilo + Domači in zaklenjen zaslon + Osnovno + Nemogoče + Datum ustvarjanja + Obreži + Dovoljenje zavrnjeno + Število uporab + Domači zaslon + Sporočila + Končano + Ni mogoče preimenovati + E-pošta + Neznano + Izbrisano + Shranjevanje neuspešno + Vnesite ime + Ne kaži več + Izbriši + Prekliči + Doseženo je največje število znakov (%d) + Štetje + Tiskanje + Prazen vnos + Doseženo je največje število znakov (%d) + Uporabi gibanje + %s že obstaja + Nalaganje... + Zaslon + Kartica SD je bila odstranjena + Obreži + Diaprojekcija + Zemljepisna dolžina + Zemljepisna dolžina + Posamezno + Brisanje ni uspelo + Nepodprta vrsta datoteke + Deli + Povečava + Kopiraj + Lokacija datoteke + XXX se že uporablja + Izvedi + Lokacije + Končaj + Čas + Zemljepisna širina + Vsi albumi + Vrsta + Več + Ozadje za dom. zaslon + Prekliči + Galerija + Velikost + Dodano + Slike + Ponovi + Ime + Ozadje za zak. zaslon + Ne pošlji + Ločljivost + Formatiraj + Lokacija + Neveljavna slikovna datoteka + Že obstaja. Prepišem? + Souporaba preko + Posredovanje + Skupni čas + Lokacija + Nepodprta\nvrsta datoteke + Zemljepisna širina + Ime datoteke + Premikanje ni uspelo + Nastavi kot + Nastavi ozadje za domači zaslon in zakleni zaslon + Ozadje za domači in zaklenjen zaslon + Podrobnosti + Spremeni ime + Mogoče + Zapis datoteke + Premakni + Brisanje ni mogoče + Odstrani + Interval + Že obstaja + Zaklenjen zaslon + Končano + Shranjevanje ni uspelo + Ni nastavljeno + diff --git a/res/spa-ES.xml b/res/spa-ES.xml new file mode 100644 index 0000000..4e4813f --- /dev/null +++ b/res/spa-ES.xml @@ -0,0 +1,99 @@ + + + + Alcanzado el número máximo de caracteres + Cualquiera + Imagen de llamante + Aleatorio + Mensajes + Pantallas de inicio y de bloqueo + Básico + Imposible + Fecha de creación + Recortar + Permiso denegado + Usos disponibles + Pantalla de inicio + Mensajes + Hecho + Imposible cambiar el nombre + Correo electrónico + Desconocido + Eliminado + No se puede guardar + Introducir nombre + No mostrar de nuevo + Eliminar + Cancelar + Número máximo de caracteres (%d) alcanzado + Contar + Imprimir + Entrada vacía + Número máximo de caracteres (%d) alcanzado + Utilizar movimiento + %s ya existe + Cargando... + Pantalla + Se ha extraído la tarjeta SD + Recortar + Presentación de diapositivas + Longitud + Longitud + Individual + Error al borrar + Tipo de archivo no admitido + Compartir + Zoom + Copiar + Ubicación de archivo + El mismo nombre ya está en uso + Ejecutar + Ubicaciones + Finalizar + Hora + Latitud + Todos los álbumes + Tipo + Más + Fondo de pantalla de inicio + Cancelar + Galería + Tamaño + Añadido + Imágenes + Repetir + Nombre + Fondo de pantalla de bloqueo + No enviar + Resolución + Formatear + Ubicación + Archivo de imagen no válido + Ya existe. ¿Desea reemplazarlo? + Compartir + Reenviando + Tiempo acumulado + Ubicación + Tipo de archivo\nno admitido + Latitud + Nombre + Error al mover + Definir como + Definir fondo de pantalla para la pantalla de inicio y de bloqueo + Fondo de pantalla de pantalla de inicio y bloqueo + Detalles + Cambiar nombre + Posible + Formato de archivo + Mover + No se puede eliminar + Eliminar + Intervalo + Ya existe + Pantalla de bloqueo + Guardar + Error al guardar + N/A + diff --git a/res/spa-MX.xml b/res/spa-MX.xml new file mode 100644 index 0000000..8d4134a --- /dev/null +++ b/res/spa-MX.xml @@ -0,0 +1,99 @@ + + + + Se ha alcanzado el número máximo de caracteres + Cualquiera + ID del llamante + Aleatorio + Mensaje + Pantallas de inicio y de bloqueo + Básico + Imposible + Fecha de creación + Recortar + Permiso denegado + Usos disponibles + Pantalla de inicio + Mensajes + Realizado + No se puede renombrar + Correo + Desconocido + Eliminado + No se puede guardar + Introducir nombre + No mostrar de nuevo + Eliminar + Cancelar + Número máximo de caracteres (%d) alcanzado + Recuento + Imprimir + Entrada vacía + Número máximo de caracteres (%d) alcanzado + Utilizar movimiento + %s ya existe + Cargando... + Pantalla + Se ha extraído la tarjeta de memoria + Recortar + Presentación de diapositivas + Longitud + Longitud + Individual + Error al eliminar + Tipo de archivo no admitido + Compartir + Zoom + Copiar + Ubicación del archivo + Ya existe ese nombre + Ejecutar + Ubicaciones + Finalizar + Hora + Latitud + Todos los álbumes + Tipo + Más + Fondo pantalla inicio + Cancelar + Galería + Tamaño + Añadido + Imágenes + Repetir + Nombre + Fondo pantalla bloq. + No enviar + Resolución + Formatear + Ubicación + Archivo de imagen no válido + Ya existe. ¿Desea reemplazarlo? + Compartir vía + Reenvío + Tiempo acumulado + Ubicación + Tipo de archivo\nno compatible + Latitud + Nombre de archivo + Error al mover + Definir como + Definir fondo para la pantalla de inicio y de bloqueo + Fondo de pantalla de inicio y bloqueo de pantalla + Detalles + Renombrar + Posible + Formato del archivo + Mover + No puede eliminar + Eliminar + Intervalo + Ya existe + Pantalla de bloqueo + Realizado + Error al guardar + N/A + diff --git a/res/srp-RS.xml b/res/srp-RS.xml new file mode 100644 index 0000000..4c6cb70 --- /dev/null +++ b/res/srp-RS.xml @@ -0,0 +1,99 @@ + + + + Dostignut maksimalan broj karaktera + Sve + Slika pozivaoca + Nasumično + Poruka + Početni i zaključani ekrani + Osnovni + Nemoguće + Datum kreiranja + Odseci + Dozvola odbijena + Moguće upotrebe + Početni ekran + Poruke + Gotovo + Nemoguće preimenovati + E-pošta + Nepoznato + Obrisano + Nemoguće sačuvati + Unesi ime + Ne prikazuj ponovo + Obriši + Poništi + Dostignut maksimalan broj karaktera (%d) + Broj + Štampaj + Unos je prazan + Dostignut maksimalan broj karaktera (%d) + Koristi pokrete + %s već postoji + Učitavanje... + Ekran + SD kartica izvađena + Opseci + Slajd-šou + Geografska dužina + Geografska dužina + Pojedinačno + Brisanje neuspešno + Nepodržani tip fajla + Podeli + Zumiranje + Kopiraj + Lokacija fajla + Taj naziv je već u upotrebi + Izvrši + Lokacije + Kraj + Vreme + Geografska širina + Svi albumi + Tip + Još + Tapet početnog ekrana + Poništi + Galerija + Veličina + Dodato + Slike + Ponovi + Ime + Tapet zaključ. ekrana + Ne šalji + Rezolucija + Format + Lokacija + Neispravna slika + Već postoji. Prebriši? + Podeli putem + Prosleđivanje + Akumulirano vreme + Lokacija + Nepodržan\ntip fajla + Geografska širina + Ime fajla + Premeštanje neuspešno + Postavi kao + Podesi tapete za početni i zaključani ekran + Tapet početnog i zaključanog ekrana + Detalji + Promeni ime + moguće + Format fajla + Premesti + Nemoguće obrisati + Ukloni + Interval + Već postoji + Zaključavanje ekrana + Gotovo + Memorisanje neuspešno + Nema + diff --git a/res/swe-SE.xml b/res/swe-SE.xml new file mode 100644 index 0000000..66ad0c3 --- /dev/null +++ b/res/swe-SE.xml @@ -0,0 +1,99 @@ + + + + Maximalt antal tecken har använts + Alla + Foto-ID + Slumpmässigt + Meddelande + Hem- och låsskärmar + Grundläggande + Ej möjlig + Skapat den + Beskär + Tillstånd nekades + Tillgängliga tillämpningar + Hemskärm + Meddelanden + Klar + Kan inte byta namn + E-post + Okänd + Raderad + Kunde ej spara + Ange namn + Visa inte igen + Radera + Avbryt + Högsta antal tecken (%d) har uppnåtts + Antal + Skriv ut + Posten är tom + Högsta antal tecken (%d) har uppnåtts + Använd rörelse + %s finns redan + Laddar... + Display + SD-kortet har tagits bort + Beskär + Bildspel + Longitud + Longitud + Individuell + Radering misslyckades + Filtypen stöds inte + Dela + Zoom + Kopiera + Filplats + Detta namn används redan + Exekvera + Platser + Avsluta + Tid + Latitud + Alla album + Typ + Mer + Bakg. för hemskärmen + Avbryt + Galleri + Storlek + Tillagd + Bilder + Upprepa + Namn + Bakgrund för låsskärm + Skicka inte + Upplösning + Format + Plats + Ogiltig bildfil + Används redan.\nSkriv över? + Dela via + Vidarebefordra + Sammanlagd tid + Plats + Filtypen\nstöds inte + Latitud + Filnamn + Det gick inte att flytta + Använd som + Ange bakgrund för startsidan och låsskärmen + Bakgrund för start- och låsskärmen + Detaljer + Byt namn + Möjlig + Filformat + Flytta + Kan inte radera + Ta bort + Intervall + Finns redan + Låsskärm + Klar + Det gick inte att spara + Saknas + diff --git a/res/tur-TR.xml b/res/tur-TR.xml new file mode 100644 index 0000000..c48cd88 --- /dev/null +++ b/res/tur-TR.xml @@ -0,0 +1,99 @@ + + + + Maksimum karakter sayısına ulaşıldı + Herhangi + Arayanın resmi + Rasgele + Mesaj + Ana ve kilit ekranları + Temel + İmkansız + Oluşturma tarihi + Kırp + İzin reddedildi + Mevcut kullanımlar + Ana sayfa ekranı + Mesajlar + Kaydet + Yeniden adlandırılamıyor. Dosya kullanımda. + E-posta + Bilinmeyen + Silindi + Kaydetme başarısız + İsim girin + Bir daha gösterme + Sil + İptal + Maksimum karakter sayısına (%d) ulaşıldı + sayım + Yazdır + Girdi yok + Maksimum karakter sayısına (%d) ulaşıldı + Hareket kullan + %s zaten var + Yükleniyor... + Ekran + SD kart çıkartıldı + Kırp + Slayt gösterisi + Boylam + Boylam + Kişisel + Silinemedi + Desteklenmeyen dosya türü + Paylaşıma aç + Yakınlaştır + Kopyala + Dosya konumu + İsim zaten kullanımda + Uygulama + Yerler + Bitir + Saat + Enlem + Tüm albümler + Tür + Diğer + Ana ekran duvr kağıdı + İptal + Galeri + Boyut + Eklendi + Resimler + Tekrarla + İsim + Kltli ekran dvrkağıdı + Gönderme + Çözünürlük + Biçimlendir + Konum + Geçersiz resim dosyası + Zaten var. Üzerine yazılsın mı? + Şununla paylaş + İletme + Toplu süre + Konum + Dosya türü\ndesteklenmiyor + Enlem + Dosya adı + Taşıma başarısız + Yap + Ana ekran için duvar kağıdı ayarla ve ekranı kilitle + Ana ekran ve kilit ekranı duvar kağıdı + Ayrıntılar + İsim değiştir + Mümkün + Dosya biçimi + Taşı + Silinemiyor + Kaldır + Aralık + Zaten var + Kilit ekranı + Tamamlandı + Kaydetme başarısız + Geçerli değil + diff --git a/res/ukr-UA.xml b/res/ukr-UA.xml new file mode 100644 index 0000000..0a94473 --- /dev/null +++ b/res/ukr-UA.xml @@ -0,0 +1,99 @@ + + + + Досягнуто максимальної кількості символів + Any + Зображення абонента + Випадково + Повідомлення + Головний екр. та екр. блокування + Основний + Неможливо + Дату створено + Обробити + У дозволі відмовлено + Доступні використання + Головний екран + Повідомлення + Готово + Неможливо перейменувати + Email + Невідомо + Видалено + Неможливо зберегти + Введіть назву + Більше не показувати + Видалити + Скасувати + Досягнуто максимальної кількості символів: %d + Кількість + Друк + Запис порожній + Досягнуто максимальної кількості символів: %d + Використовувати рух + %s вже існує + Завантаження... + Дисплей + Карту пам’яті видалено + Обрізати + Слайд-шоу + Довгота + Довгота + Індивідуальні + Збій видалення + Формат не підтримується + Надіслати + Масштаб + Копіювати + Розташування файла + Ім’я вже використовується + Виконати + Розташування + Кінець + Час + Широта + Усі альбоми + Тип + Більше + Заставка головного екр. + Скасувати + Галерея + Розмір + Додано + Зображення + Повторення + Назва + Заставка екр. блокування + Не надсилати + Роздільна здатність + Форматувати + Розташування + Хибний файл зображення + Вже існує. Переписати? + Відкрити доступ через + Переадресація + Загальний час + Розташування + Тип файла\nне підтримується + Широта + Ім’я файла + Збій переміщення + Встановити як + Встановлення заставки для екрана оформлення та екрана блокування + Заставка для екранів оформлення та блокування + Деталі + Змінити ім'я + Можливо + Формат файла + Перемістити + Неможливо видалити + Видалити + Інтервал + Вже існує + Екран блокування + Готово + Збій збереження + Н/Д + diff --git a/res/uzb-UZ.xml b/res/uzb-UZ.xml new file mode 100644 index 0000000..365bae7 --- /dev/null +++ b/res/uzb-UZ.xml @@ -0,0 +1,99 @@ + + + + Belgilar soni ruxsat etilgan maksimal miqdorga yetdi + Har qanday + Qo‘ng‘iroq qiluvchi rasmi + Tasodifiy + Xabar + Asosiy va bloklash ekranlari + Boshlang'ich + Imkonsiz + Yaratilgan sana + Bezatish + Ruxsat rad etildi + Mavjud foydalanishlar + Asosiy ekran + Xabarlar + Bajarildi + Nomini o‘zgartirib bo‘lmaydi + E-pochta + Noma’lum + O'chirildi + Saqlab bo‘lmaydi + Nom kiriting + Boshqa ko‘rsatilmasin + O'chirish + Bekor qilish + Belgilar soni ruxsat etilgan maksimal miqdorga (%d) yetdi + Hisob + Chop etish + Kiritish bo‘sh + Belgilar soni ruxsat etilgan maksimal miqdorga (%d) yetdi + Harakatdan foydalanish + %s avvaldan mavjud + Yuklanmoqda... + Displey + SD-karta olib tashlandi + Kesish + Slayd-shou + Uzunlik + Uzunlik + Individual + Yo‘q qilish bajarilmadi + Qo‘llab-quvvatlanmaydigan fayl turi + Ulashish + Masshtabni o‘zgartirish + Nusxa olish + Fayl joylashuvi + Bunday nom avvaldan ishlatilmoqda + Amalga oshirish + Joylashuvlar + Tugatish + Vaqt + Kenglik + Barcha albomlar + Tur + Ko‘proq + As. ekran fon rasmi + Bekor q. + Galereya + O‘lcham + Qo‘shilgan + Tasvirlar + Takrorlash + Nom + Blok. ekran fon rasmi + Yuborilmasin + Rezolyutsiya + Format + Joylashuv + Noto‘g‘ri tasvir fayli + Avvaldan mavjud. Ustidan yozilsinmi? + Quyidagi orqali ulashish + Boshqaga yo‘naltirish + Yig‘ilgan vaqt + Joylashuv + Qo‘llab-quvvatlanmaydigan\nfayl turi + Kenglik + Fayl nomi + Ko‘chirib bo‘lmadi + O‘rnatish + Asosiy va bloklangan ekran uchun fon rasmi o‘rnatish + Asosiy va bloklash ekrani fon rasmi + Tafsilotlar + Nomni o‘zgartirish + Taxminiy + Fayl formati + Ko‘chirish + Yo‘q qilib bo‘lmaydi + Olib tashlash + Interval + Avvaldan mavjud + Bloklash ekrani + Bajarildi + Saqlab bo‘lmadi + YO‘Q + diff --git a/res/zho-CN.xml b/res/zho-CN.xml new file mode 100644 index 0000000..31b9db1 --- /dev/null +++ b/res/zho-CN.xml @@ -0,0 +1,99 @@ + + + + 已达到最大字符限制 + 任何 + 来电图片 + 随机 + 信息 + 主屏幕与锁定屏幕 + 基本 + 不可以 + 创建日期 + 修剪 + 许可被拒绝 + 可用于 + 主屏 + 信息 + 完成 + 无法重命名 + 电子邮件 + 未知 + 已删除 + 无法存储 + 名字不能为空 + 不要再显示 + 删除 + 取消 + 已达到最大字符数(%d) + 计数 + 打印 + 空记录 + 已达到最大字符数(%d) + 使用动作 + %s 已存在 + 载入中… + 显示 + SD卡已移除 + 裁剪 + 幻灯片 + 经度 + 经度 + 个人 + 删除失败 + 不支持的文件类型 + 共享 + 缩放 + 复制 + 路径 + 相同名字已使用 + 执行 + 位置 + 结束 + 时间 + 纬度 + 所有相册 + 类型 + 更多 + 主屏幕墙纸 + 取消 + 图库 + 大小 + 已添加 + 图片 + 重复 + 名称 + 锁定屏幕墙纸 + 不要发送 + 分辨率 + 格式化 + 位置 + 图像文件无效 + 已存在。覆盖? + 共享通过 + 转发 + 累计时间 + 位置 + 不支持的\n文件类型 + 纬度 + 文件名称 + 移动失败 + 设定为 + 为主屏幕和锁定屏幕设置墙纸 + 主屏和锁屏壁纸 + 详情 + 更改名称 + 可以 + 文件格式 + 移动 + 无法删除 + 移除 + 间隔 + 已经存在 + 锁定屏幕 + 完成 + 储存失败 + N/A + diff --git a/res/zho-HK.xml b/res/zho-HK.xml new file mode 100644 index 0000000..32bdd42 --- /dev/null +++ b/res/zho-HK.xml @@ -0,0 +1,99 @@ + + + + 字元數目已達上限 + 任何 + 來電者圖像 + 隨機 + 訊息 + 主螢幕和鎖定螢幕 + 灰底 + 不可以 + 建立日期 + 修剪 + 權限被拒絕 + 可供使用 + 主螢幕 + 訊息 + 完成 + 無法重新命名 + 電子郵件 + 未知 + 已刪除 + 無法儲存 + 輸入名稱 + 不再顯示 + 刪除 + 取消 + 已達字元數目上限 (%d) + 計數 + 列印 + 空白記錄 + 已達字元數目上限 (%d) + 使用動作 + %s 已存在 + 正在載入... + 顯示 + SD 卡已移除 + 裁剪 + 投影片播放 + 經度 + 經度 + 個人 + 刪除失敗 + 不支援的檔案類型 + 分享 + 縮放 + 複製 + 檔案位置 + 相同名稱已被使用 + 執行 + 位置 + 結束 + 時間 + 緯度 + 全部專輯 + 類型 + 更多 + 主螢幕牆紙 + 取消 + 媒體瀏覽器 + 大小 + 已加入 + 圖像 + 重複 + 名稱 + 鎖定螢幕牆紙 + 不要發送 + 解像度 + 格式化 + 位置 + 圖像檔案無效 + 已存在。要覆蓋嗎? + 分享透過 + 轉寄中 + 累積時間 + 位置 + 不支援的\n檔案類型 + 緯度 + 檔案名稱 + 移動失敗 + 設定為 + 為主螢幕和鎖定螢幕設定螢幕牆紙 + 主螢幕與鎖定螢幕牆紙 + 詳細資料 + 更改名稱 + 可以 + 檔案格式 + 移動 + 無法刪除 + 移除 + 間隔 + 已存在 + 鎖定螢幕 + 完成 + 儲存失敗 + 不適用 + diff --git a/res/zho-SG.xml b/res/zho-SG.xml new file mode 100644 index 0000000..0088726 --- /dev/null +++ b/res/zho-SG.xml @@ -0,0 +1,99 @@ + + + + 已达最大字符数量 + 任何 + 来电图象 + 随机 + 讯息 + 主屏和锁屏 + 基本 + 不可能 + 创建日期 + 修整 + 许可被拒绝 + 适用用法 + 主屏 + 讯息 + 已完成 + 无法重命名 + 电邮 + 未知 + 已删除 + 无法存储 + 输入名称 + 不要再显示 + 删除 + 取消 + 已达到最大字符数(%d) + 计数 + 打印 + 空记录 + 已达到最大字符数(%d) + 使用动作 + %s 已存在 + 裝载中… + 显示 + SD卡已移除 + 收获 + 幻灯片播放 + 经度 + 经度 + 个人 + 删除失败 + 不支持的文件类型 + 共享 + 变焦 + 复制 + 文件位置 + 相同名称已在使用 + 执行 + 位置 + 结束 + 时间 + 纬度 + 所有相册 + 类型 + 更多 + 主屏幕墙纸 + 取消 + 画廊 + 大小 + 已添加 + 图像 + 重复 + 名称 + 锁定屏幕墙纸 + 不要发送 + 分辨率 + 格式化 + 位置 + 图像文件无效 + 已存在。覆盖? + 共享通过 + 转发中 + 累计时间 + 地址 + 不支持的\n文件类型 + 纬度 + 文件名称 + 移动失败 + 设定为 + 为主屏幕和锁定屏幕设置墙纸 + 主屏和锁屏壁纸 + 详细内容 + 更改名称 + 可能 + 文件格式 + 移动 + 无法删除 + 移除 + 间隔 + 已经存在 + 锁定屏幕 + 已完成 + 储存失败 + N/A + diff --git a/res/zho-TW.xml b/res/zho-TW.xml new file mode 100644 index 0000000..6fb4a25 --- /dev/null +++ b/res/zho-TW.xml @@ -0,0 +1,99 @@ + + + + 已達字元數上限 + 任何 + 來電者圖像 + 隨機 + 訊息 + 主螢幕與鎖定螢幕 + 基本 + 不可能 + 建立日期 + 剪輯 + 權限被拒絕 + 可供使用 + 主螢幕 + 訊息 + 完成 + 無法重新命名 + 電子郵件 + 未知 + 已刪除 + 無法儲存 + 輸入名稱 + 不再顯示 + 刪除 + 取消 + 達到%個最大字元 + 計數 + 列印 + 項目為空 + 達到%個最大字元 + 使用動作 + %s 已存在 + 正在載入... + 顯示 + SD卡已移除 + 裁剪 + 投影片放映 + 經度 + 經度 + 個別 + 刪除失敗 + 不支援的檔案類型 + 分享 + 縮放 + 複製 + 檔案位置 + 相同名稱已在使用中 + 執行 + 位置 + 結束 + 時間 + 緯度 + 所有相簿 + 類型 + 更多 + 主螢幕桌布 + 取消 + 媒體瀏覽器 + 大小 + 已新增 + 圖像 + 重複 + 名稱 + 鎖定螢幕桌布 + 不傳送 + 解析度 + 格式化 + 位置 + 影像檔案無效 + 已存在。要覆寫嗎? + 分享經由 + 正在轉寄 + 累計時間 + 位置 + 不支援的\n檔案類型 + 緯度 + 檔案名稱 + 移動失敗 + 設定為 + 設定主螢幕與鎖定螢幕 + 主螢幕與鎖定畫面桌布 + 詳細資料 + 變更名稱 + 可能 + 檔案格式 + 移動 + 無法刪除 + 移除 + 間隔 + 已存在 + 鎖定螢幕 + 完成 + 儲存失敗 + 不適用 + 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..8169106 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/IvCommonUtil.cpp b/src/IvCommonUtil.cpp new file mode 100644 index 0000000..a63a6f0 --- /dev/null +++ b/src/IvCommonUtil.cpp @@ -0,0 +1,89 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvCommonUtil.cpp + * @brief This is the implementation file for CommonUtil class. + */ + +#include +#include "IvCommonUtil.h" + +using namespace Tizen::Base; +using namespace Tizen::Content; +using namespace Tizen::Graphics; + +ImageViewerMediaType +CommonUtil::GetMediaType(const String& filePath) +{ + AppLogDebug("Enter"); + ImageViewerMediaType mediaType = IMAGE_VIEWER_MEDIA_TYPE_OTHER; + + ContentType contentType = ContentManagerUtil::CheckContentType(filePath); + + if (contentType == CONTENT_TYPE_IMAGE) + { + mediaType = IMAGE_VIEWER_MEDIA_TYPE_IMAGE; + } + else if (contentType == CONTENT_TYPE_VIDEO) + { + mediaType = IMAGE_VIEWER_MEDIA_TYPE_VIDEO; + } + else + { + if ( filePath.EndsWith(CONTENT_EXT_JPG) + || filePath.EndsWith(CONTENT_EXT_PNG) + || filePath.EndsWith(CONTENT_EXT_BMP) + || filePath.EndsWith(CONTENT_EXT_GIF) + || filePath.EndsWith(CONTENT_EXT_TIF) + || filePath.EndsWith(CONTENT_EXT_TIFF) + || filePath.EndsWith(CONTENT_EXT_WBMP) + || filePath.EndsWith(CONTENT_EXT_JPEG)) + { + mediaType = IMAGE_VIEWER_MEDIA_TYPE_IMAGE; + } + else if ( filePath.EndsWith(CONTENT_EXT_MP4) + || filePath.EndsWith(CONTENT_EXT_3GP) + || filePath.EndsWith(CONTENT_EXT_AVI) + || filePath.EndsWith(CONTENT_EXT_ASF) + || filePath.EndsWith(CONTENT_EXT_WMV) + || filePath.EndsWith(CONTENT_EXT_FLV)) + { + mediaType = IMAGE_VIEWER_MEDIA_TYPE_VIDEO; + } + } + AppLogDebug("EXIT(%s) mediaType(%d)", GetErrorMessage(GetLastResult()), mediaType); + + return mediaType; +} + +Bitmap* +CommonUtil::CloneBitmapN(const Bitmap& bitmap) +{ + AppLogDebug("Enter"); + Bitmap* pResultBitmap = null; + if (&bitmap != null) + { + Rectangle mainRect(0, 0, bitmap.GetWidth(), bitmap.GetHeight()); + Canvas mainCanvas; + mainCanvas.Construct(mainRect); + mainCanvas.DrawBitmap(mainRect, bitmap); + pResultBitmap = new (std::nothrow) Bitmap(); + pResultBitmap->Construct(mainCanvas,mainRect); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + return pResultBitmap; +} diff --git a/src/IvFormFactory.cpp b/src/IvFormFactory.cpp new file mode 100644 index 0000000..fab0b52 --- /dev/null +++ b/src/IvFormFactory.cpp @@ -0,0 +1,73 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvFormFactory.cpp + * @brief This is the implementation file for FormFactory class. + */ + +#include "IvFormFactory.h" +#include "IvImageNameEditorForm.h" +#include "IvImageViewerForm.h" +#include "IvImageSetterForm.h" + +using namespace Tizen::Base; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; + +FormFactory::FormFactory(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +FormFactory::~FormFactory(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +Form* +FormFactory::CreateFormN(const String& formId, const SceneId& sceneId) +{ + AppLogDebug("ENTER"); + Form* pNewForm = null; + + if (formId == FORM_IMAGE_VIEWER) + { + ImageViewerForm* pForm = new (std::nothrow) ImageViewerForm(); + pForm->Initialize(); + SceneManager::GetInstance()->AddSceneEventListener(sceneId, *pForm); + pNewForm = pForm; + } + else if (formId == FORM_IMAGE_SETTER) + { + ImageSetterForm* pForm = new (std::nothrow) ImageSetterForm(); + pForm->Initialize(); + SceneManager::GetInstance()->AddSceneEventListener(sceneId, *pForm); + pNewForm = pForm; + } + else if (formId == FORM_IMAGE_NAME_EDITOR) + { + ImageNameEditorForm* pForm = new (std::nothrow) ImageNameEditorForm(); + pForm->Initialize(); + SceneManager::GetInstance()->AddSceneEventListener(sceneId, *pForm); + pNewForm = pForm; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pNewForm; +} diff --git a/src/IvImageEvent.cpp b/src/IvImageEvent.cpp new file mode 100644 index 0000000..e2f7376 --- /dev/null +++ b/src/IvImageEvent.cpp @@ -0,0 +1,40 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageEvent.cpp + * @brief This is the implementation file for ImageEvent class. + */ + +#include +#include "IvImageEvent.h" +#include "IvImageProviderEventListener.h" + +using namespace Tizen::Base::Runtime; + +ImageEvent::~ImageEvent(void) +{ +} + +void +ImageEvent::FireImpl(IEventListener& listener, const IEventArg& eventArg) +{ + IImageProviderEventListener* plistener = static_cast (&listener); + if (plistener != null) + { + plistener->OnImageReceivedN(*(const_cast(&eventArg))); + } +} diff --git a/src/IvImageEventArg.cpp b/src/IvImageEventArg.cpp new file mode 100644 index 0000000..87f43d2 --- /dev/null +++ b/src/IvImageEventArg.cpp @@ -0,0 +1,54 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageEventArg.cpp + * @brief This is the implementation file for ImageEventArg class. + */ + +#include +#include "IvCommonUtil.h" +#include "IvImageEventArg.h" + +using namespace std; +using namespace Tizen::Graphics; + +ImageEventArg::ImageEventArg(const Tizen::Base::String& filePath, Tizen::Graphics::Bitmap* pBitmap) + : __filePath(filePath) + , __pBitmap(pBitmap) +{ +} + +ImageEventArg::~ImageEventArg(void) +{ + if (__pBitmap != null) + { + delete __pBitmap; + } +} + +Tizen::Base::String +ImageEventArg::GetFilePath(void) const +{ + return __filePath; +} + + +Bitmap* +ImageEventArg::GetBitmapN(void) const +{ + return CommonUtil::CloneBitmapN(*__pBitmap); +} diff --git a/src/IvImageInfo.cpp b/src/IvImageInfo.cpp new file mode 100644 index 0000000..8bb480d --- /dev/null +++ b/src/IvImageInfo.cpp @@ -0,0 +1,93 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 GlImageInfo.cpp + * @brief This is the implementation file for ImageInfo class. + */ + +#include "IvCommonUtil.h" +#include "IvImageInfo.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +ImageInfo::ImageInfo(void) + : __pBitmap(null) +{ +} + +ImageInfo::~ImageInfo(void) +{ + if (__pBitmap != null) + { + delete __pBitmap; + } +} + +void +ImageInfo::Construct(String& pFilePath, Bitmap* pBitmap) +{ + AppLogDebug("Enter"); + __pFilePath = pFilePath; + __pBitmap = pBitmap; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +String +ImageInfo::GetFilePath(void) const +{ + AppLogDebug("Enter"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + return __pFilePath; +} + +void +ImageInfo::SetFilePath(const String& filePath) +{ + AppLogDebug("Enter"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + __pFilePath = filePath; +} + +Bitmap* +ImageInfo::GetBitmapN(void) const +{ + AppLogDebug("Enter"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + return CommonUtil::CloneBitmapN(*__pBitmap); +} + +void +ImageInfo::SetBitmap(Tizen::Graphics::Bitmap* pBitmap) +{ + AppLogDebug("Enter pBitmap(%x)", pBitmap); + if (__pBitmap != null) + { + delete __pBitmap; + } + __pBitmap = pBitmap; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageInfo::ClearBitmap(void) +{ + AppLogDebug("Enter"); + delete __pBitmap; + __pBitmap = null; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} diff --git a/src/IvImageJob.cpp b/src/IvImageJob.cpp new file mode 100644 index 0000000..ae92a15 --- /dev/null +++ b/src/IvImageJob.cpp @@ -0,0 +1,63 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageJob.cpp + * @brief This is the implementation file for ImageJob class. + */ + +#include +#include "IvImageEvent.h" +#include "IvImageJob.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; + +ImageJob::ImageJob(void) + : __requestId(0) + , __pRequestEvent(null) +{ +} + +ImageJob::~ImageJob(void) +{ +} + +void +ImageJob::Construct(const String& filePath, const unsigned long requestId, const ImageEvent* pRequestEvent) +{ + __filePath = filePath; + __requestId = requestId; + __pRequestEvent = pRequestEvent; +} + +String +ImageJob::GetFilePath(void) const +{ + return __filePath; +} + +unsigned long +ImageJob::GetRequestId() const +{ + return __requestId; +} + +const ImageEvent* +ImageJob::GetEvent(void) const +{ + return __pRequestEvent; +} diff --git a/src/IvImageNameEditorForm.cpp b/src/IvImageNameEditorForm.cpp new file mode 100644 index 0000000..d6d4e80 --- /dev/null +++ b/src/IvImageNameEditorForm.cpp @@ -0,0 +1,528 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageNameEditorForm.cpp + * @brief This is the implementation file for ImageNameEditorForm class. + */ + +#include +#include +#include "IvCommonUtil.h" +#include "IvImageNameEditorForm.h" +#include "IvImageViewerPresentationModel.h" +#include "IvResourceManager.h" +#include "IvTypes.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Utility; +using namespace Tizen::Content; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; +using namespace Tizen::Graphics; +using namespace Tizen::Media; +using namespace Tizen::Io; +using namespace Tizen::System; + +static const Rectangle RECT_NAME_EDIT_FIELD (0, 0, 720, 100); +static const Rectangle RECT_LANDSCAPE_NAME_EDIT_FIELD (0, 0, 1280, 100); +static const wchar_t* CONTENT_ID_STRING_EMPTY = L"00000000-0000-0000-0000-000000000000"; + +static const unsigned int COLOR_NAME_EDIT_FIELD = Color32<255, 255, 255>::Value; +static const int FILE_MAX_LENGTH = 255; + +ImageNameEditorForm::ImageNameEditorForm() + : __currentIndex(0) + , __pNameEditField(null) + , __pMessageBox(null) + , __pPresentationModel(null) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +ImageNameEditorForm::~ImageNameEditorForm() +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +ImageNameEditorForm::Initialize(void) +{ + AppLogDebug("ENTER"); + result r = Construct(FORM_STYLE_HEADER | FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +ImageNameEditorForm::OnInitializing(void) +{ + AppLogDebug("ENTER"); + SetOrientation(ORIENTATION_AUTOMATIC); + AddOrientationEventListener(*this); + Header* pHeader = GetHeader(); + pHeader->SetTitleText(ResourceManager::GetString(L"IDS_COM_BODY_CHANGE_NAME")); + + pHeader->SetStyle(HEADER_STYLE_BUTTON); + HeaderItem doneItem; + HeaderItem cancelItem; + doneItem.Construct(ACTION_ID_BUTTON_EDITFIELD_DONE); + doneItem.SetText(ResourceManager::GetString(L"IDS_COM_SK_DONE")); + cancelItem.Construct(ACTION_ID_BUTTON_EDITFIELD_CANCEL); + cancelItem.SetText(ResourceManager::GetString(L"IDS_COM_SK_CANCEL")); + pHeader->SetStyle(HEADER_STYLE_BUTTON); + pHeader->AddItem(doneItem); + pHeader->AddItem(cancelItem); + pHeader->AddActionEventListener(*this); + + __pNameEditField = new (std::nothrow) EditField(); + __pNameEditField->Construct(RECT_NAME_EDIT_FIELD, EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY, false, + FILE_MAX_LENGTH); + __pNameEditField->SetColor(EDIT_STATUS_NORMAL, COLOR_NAME_EDIT_FIELD); + __pNameEditField->AddTextEventListener(*this); + + AddControl(*__pNameEditField); + __pNameEditField->AddActionEventListener(*this); + + __pPresentationModel = ImageViewerPresentationModel::GetInstance(); + String filePath = __pPresentationModel->GetFilePathAt(__currentIndex); + __nameEditFieldText = __pPresentationModel->GetFileName(filePath, true); + + __nameEditFieldPreText = __nameEditFieldText; + + __pNameEditField->SetText(__nameEditFieldText); + __nameEditFieldTempText = __nameEditFieldText; + __pNameEditField->SetOverlayKeypadCommandButtonVisible(false); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +ImageNameEditorForm::OnOrientationChanged(const Control &source, OrientationStatus orientationStatus) +{ + AppLogDebug("ENTER"); + if (orientationStatus == ORIENTATION_STATUS_LANDSCAPE + || orientationStatus == ORIENTATION_STATUS_LANDSCAPE_REVERSE) + { + __pNameEditField->SetBounds(RECT_LANDSCAPE_NAME_EDIT_FIELD); + } + else + { + __pNameEditField->SetBounds(RECT_NAME_EDIT_FIELD); + } + Draw(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +ImageNameEditorForm::OnTerminating(void) +{ + AppLogDebug("ENTER"); + if (__pMessageBox != null) + { + delete __pMessageBox; + __pMessageBox = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +ImageNameEditorForm::OnActionPerformed(const Control& source, int actionId) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + + String filePath = __pPresentationModel->GetFilePathAt(__currentIndex); + String originalFilePath = filePath; + String inputString; + __nameEditFieldText = __pNameEditField->GetText(); + + switch (actionId) + { + case ACTION_ID_BUTTON_EDITFIELD_DONE: + inputString = __nameEditFieldText; + if (__nameEditFieldPreText == __nameEditFieldText) + { + MessageBox messageBox; + messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MEDIABR_POP_SAME_NAME_ALREADY_IN_USE"), + MSGBOX_STYLE_NONE, 3000); + int modalResult = 0; + messageBox.ShowAndWait(modalResult); + __pNameEditField->SetFocus(); + } + else + { + filePath.Replace(__nameEditFieldPreText, __nameEditFieldText); + if (File::IsFileExist(filePath) == true) + { + MessageBox messageBox; + messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_ALREDY_EXISTS"), + MSGBOX_STYLE_NONE, 3000); + int modalResult = 0; + messageBox.ShowAndWait(modalResult); + __pNameEditField->SetFocus(); + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + if (originalFilePath.StartsWith(Environment::GetMediaPath(), 0) == true + || originalFilePath.StartsWith(Environment::GetExternalStoragePath(), 0) == true) + { + ContentId contentId = __pPresentationModel->GetFileContentId(originalFilePath); + ContentManager contentManager; + result r = contentManager.Construct(); + if (r == E_SUCCESS) + { + ImageViewerMediaType mediaType = CommonUtil::GetMediaType(originalFilePath); + if (mediaType == IMAGE_VIEWER_MEDIA_TYPE_IMAGE) + { + if (contentId.ToString().CompareTo(CONTENT_ID_STRING_EMPTY) == 0) + { + ImageContentInfo orgContentInfo; + r = orgContentInfo.Construct(&originalFilePath); + if (r == E_SUCCESS) + { + contentId = contentManager.CreateContent(orgContentInfo); + if (contentId.ToString().CompareTo(CONTENT_ID_STRING_EMPTY) != 0) + { + r = File::Copy(originalFilePath, filePath, false); + if (r != E_SUCCESS) + { + MessageBox messageBox; + messageBox.Construct(L"", + ResourceManager::GetString(L"IDS_MEDIABR_POP_UNABLE_TO_RENAME"), + MSGBOX_STYLE_NONE, 3000); + int modalResult = 0; + messageBox.ShowAndWait(modalResult); + __pNameEditField->SetFocus(); + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return; + } + } + else + { + MessageBox messageBox; + messageBox.Construct(L"", + ResourceManager::GetString(L"IDS_MEDIABR_POP_UNABLE_TO_RENAME"), + MSGBOX_STYLE_NONE, 3000); + int modalResult = 0; + messageBox.ShowAndWait(modalResult); + __pNameEditField->SetFocus(); + AppLogDebug("EXIT 3 : Cannot register Content DB(%s)", GetErrorMessage(GetLastResult())); + + return; + } + } + } + else + { + r = File::Copy(originalFilePath, filePath, false); + if (r != E_SUCCESS) + { + MessageBox messageBox; + messageBox.Construct(L"", + ResourceManager::GetString(L"IDS_MEDIABR_POP_UNABLE_TO_RENAME"), + MSGBOX_STYLE_NONE, 3000); + int modalResult = 0; + messageBox.ShowAndWait(modalResult); + __pNameEditField->SetFocus(); + AppLogDebug("EXIT 4(%s)", GetErrorMessage(GetLastResult())); + + return; + } + } + ImageContentInfo contentInfo; + r = contentInfo.Construct(&filePath); + if (r == E_SUCCESS) + { + contentManager.CreateContent(contentInfo); + } + + if (r != E_SUCCESS || GetLastResult() != E_SUCCESS) + { + MessageBox messageBox; + messageBox.Construct(L"", + ResourceManager::GetString(L"IDS_MEDIABR_POP_UNABLE_TO_RENAME"), + MSGBOX_STYLE_NONE, 3000); + int modalResult = 0; + messageBox.ShowAndWait(modalResult); + __pNameEditField->SetFocus(); + AppLogDebug("EXIT 5(%s)", GetErrorMessage(GetLastResult())); + + return; + } + contentManager.DeleteContent(contentId); + } + else if (mediaType == IMAGE_VIEWER_MEDIA_TYPE_VIDEO) + { + if (contentId.ToString().CompareTo(CONTENT_ID_STRING_EMPTY) == 0) + { + VideoContentInfo orgContentInfo; + r = orgContentInfo.Construct(&originalFilePath); + if (r == E_SUCCESS) + { + contentId = contentManager.CreateContent(orgContentInfo); + if (contentId.ToString().CompareTo(CONTENT_ID_STRING_EMPTY) != 0) + { + r = File::Copy(originalFilePath, filePath, false); + if (r != E_SUCCESS) + { + MessageBox messageBox; + messageBox.Construct(L"", L"File rename failed", MSGBOX_STYLE_NONE, 3000); + int modalResult = 0; + messageBox.ShowAndWait(modalResult); + __pNameEditField->SetFocus(); + AppLogDebug("EXIT 7(%s)", GetErrorMessage(GetLastResult())); + + return; + } + } + else + { + MessageBox messageBox; + messageBox.Construct(L"", + ResourceManager::GetString(L"IDS_MEDIABR_POP_UNABLE_TO_RENAME"), + MSGBOX_STYLE_NONE, 3000); + int modalResult = 0; + messageBox.ShowAndWait(modalResult); + __pNameEditField->SetFocus(); + AppLogDebug("EXIT 8 :Cannot register Content DB(%s)", GetErrorMessage(GetLastResult())); + + return; + } + } + } + else + { + r = File::Copy(originalFilePath, filePath, false); + if (r != E_SUCCESS) + { + MessageBox messageBox; + messageBox.Construct(L"", + ResourceManager::GetString(L"IDS_MEDIABR_POP_UNABLE_TO_RENAME"), + MSGBOX_STYLE_NONE, 3000); + int modalResult = 0; + messageBox.ShowAndWait(modalResult); + __pNameEditField->SetFocus(); + AppLogDebug("EXIT 9(%s)", GetErrorMessage(GetLastResult())); + + return; + } + } + VideoContentInfo contentInfo; + r = contentInfo.Construct(&filePath); + if (r == E_SUCCESS) + { + contentManager.CreateContent(contentInfo); + } + + if (r != E_SUCCESS || GetLastResult() != E_SUCCESS) + { + MessageBox messageBox; + messageBox.Construct(L"", + ResourceManager::GetString(L"IDS_MEDIABR_POP_UNABLE_TO_RENAME"), + MSGBOX_STYLE_NONE, 3000); + int modalResult = 0; + messageBox.ShowAndWait(modalResult); + __pNameEditField->SetFocus(); + AppLogDebug("EXIT 10(%s)", GetErrorMessage(GetLastResult())); + + return; + } + contentManager.DeleteContent(contentId); + } + else + { + MessageBox messageBox; + messageBox.Construct(L"", L"Unsuported data type", MSGBOX_STYLE_NONE, 3000); + int modalResult = 0; + messageBox.ShowAndWait(modalResult); + __pNameEditField->SetFocus(); + AppLogDebug("EXIT 11(%s)", GetErrorMessage(GetLastResult())); + + return; + } + } + } + __pPresentationModel->UpdateFilePathAt(__currentIndex, filePath); + __nameEditFieldPreText = __nameEditFieldText; + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_VIEWER)); + } + break; + case ACTION_ID_BUTTON_EDITFIELD_CANCEL: + __pNameEditField->SetText(__nameEditFieldPreText); + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_VIEWER)); + break; + default: + break; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageNameEditorForm::OnFormBackRequested(Form& source) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_VIEWER)); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageNameEditorForm::OnTextValueChangeCanceled (const Control &source) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageNameEditorForm::OnTextValueChanged (const Control &source) +{ + AppLogDebug("ENTER"); + + String filePath = __pPresentationModel->GetFilePathAt(__currentIndex); + String inputString = __pNameEditField->GetText(); + + String ext = File::GetFileExtension(filePath); + + ByteBuffer* buffer = StringUtil::StringToUtf8N(inputString); + int remaining = 0; + if (buffer != null) + { + remaining = buffer->GetRemaining(); + } + int maximumLength = FILE_MAX_LENGTH - ext.GetLength() - 1; + + if (remaining >= maximumLength) + { + if (__pMessageBox == null) + { + __pMessageBox = new (std::nothrow) MessageBox(); + __pMessageBox->Construct(L"", + ResourceManager::GetString(L"IDS_COM_POP_MAXIMUM_NUMBER_OF_CHARACTERS_REACHED"), + MSGBOX_STYLE_NONE, 3000); + int modalResult = 0; + __pMessageBox->ShowAndWait(modalResult); + + delete __pMessageBox; + __pMessageBox = null; + + __pNameEditField->SetText(__nameEditFieldTempText); + __pNameEditField->SetFocus(); + } + AppLogDebug("EXIT1(%s)", GetErrorMessage(GetLastResult())); + return; + } + __nameEditFieldTempText = inputString; + + inputString.Trim(); + + Header* header = GetHeader(); + HeaderItemStatus itemStatus; + header->GetItemStatus(0, itemStatus); + if (inputString.GetLength() == 0) + { + if (itemStatus != HEADER_ITEM_STATUS_DISABLED) + { + header->SetItemEnabled(0, false); + header->RequestRedraw(true); + } + } + else + { + if (itemStatus == HEADER_ITEM_STATUS_DISABLED) + { + header->SetItemEnabled(0, true); + header->RequestRedraw(true); + } + } + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageNameEditorForm::OnSceneActivatedN(const SceneId& previousSceneId, + const SceneId& currentSceneId, IList* pArgs) +{ + AppLogDebug("ENTER"); + if (previousSceneId == IDSCN_IMAGE_VIEWER) + { + if (pArgs != null) + { + IEnumerator* pEnum = pArgs->GetEnumeratorN(); + if (pEnum->MoveNext() == E_SUCCESS) + { + Integer *index = static_cast(pEnum->GetCurrent()); + if (index != null) + { + __currentIndex = index->ToInt(); + } + } + delete pEnum; + delete pArgs; + } + + String filePath = __pPresentationModel->GetFilePathAt(__currentIndex); + __nameEditFieldText = __pPresentationModel->GetFileName(filePath, true); + + __nameEditFieldPreText = __nameEditFieldText; + __pNameEditField->SetText(__nameEditFieldText); + __nameEditFieldTempText = __nameEditFieldText; + __pNameEditField->SetOverlayKeypadCommandButtonVisible(false); + __pNameEditField->SetFocus(); + + Header* header = GetHeader(); + HeaderItemStatus itemStatus; + header->GetItemStatus(0, itemStatus); + filePath.Trim(); + if (filePath.GetLength() == 0) + { + if (itemStatus != HEADER_ITEM_STATUS_DISABLED) + { + header->SetItemEnabled(0, false); + header->RequestRedraw(true); + } + } + else + { + if (itemStatus == HEADER_ITEM_STATUS_DISABLED) + { + header->SetItemEnabled(0, true); + header->RequestRedraw(true); + } + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageNameEditorForm::OnSceneDeactivated(const SceneId& currentSceneId, + const SceneId& nextSceneId) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} diff --git a/src/IvImageProvider.cpp b/src/IvImageProvider.cpp new file mode 100644 index 0000000..de06d3f --- /dev/null +++ b/src/IvImageProvider.cpp @@ -0,0 +1,331 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageProvider.cpp + * @brief This is the implementation file for ImageProvider class. + */ + +#include +#include +#include +#include "IvCommonUtil.h" +#include "IvResourceManager.h" +#include "IvImageEvent.h" +#include "IvImageEventArg.h" +#include "IvImageJob.h" +#include "IvImageProvider.h" +#include "IvTypes.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Utility; +using namespace Tizen::Content; +using namespace Tizen::Graphics; +using namespace Tizen::Media; + +ImageProvider* ImageProvider::__pImageProviderInstance = null; +ArrayList* ImageProvider::__pImageEventListener = null; + +ImageProvider::ImageProvider(void) + : __pMutexCmd(null) + , __pCmdQueue(null) + , __requestId(0) + , __appTerminating(false) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +ImageProvider::~ImageProvider(void) +{ + AppLogDebug("ENTER"); + if (__pImageProviderInstance != null) + { + __pImageProviderInstance->Stop(); + __pImageProviderInstance->Join(); + } + + if (__pImageEventListener != null) + { + delete __pImageEventListener; + } + + if (__pMutexCmd != null) + { + delete __pMutexCmd; + } + + if (__pCmdQueue != null) + { + delete __pCmdQueue; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +ImageProvider* +ImageProvider::GetInstance(void) +{ + AppLogDebug("ENTER"); + if (__pImageProviderInstance == null) + { + CreateInstance(); + __pImageProviderInstance->Start(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __pImageProviderInstance; +} + +result +ImageProvider::Construct(void) +{ + AppLogDebug("ENTER"); + + __pImageEventListener = new (std::nothrow) ArrayList(SingleObjectDeleter); + result r = __pImageEventListener->Construct(); + TryCatch(r == E_SUCCESS, , "[%s] Unable to set event listener", GetErrorMessage(r)); + + __pMutexCmd = new (std::nothrow) Mutex(); + r = __pMutexCmd->Create(); + TryCatch(r == E_SUCCESS, , "[%s] Unable to create mutex", GetErrorMessage(r)); + + if (__pCmdQueue != null) + { + delete __pCmdQueue; + } + __pCmdQueue = new (std::nothrow) ArrayList(SingleObjectDeleter); + r = __pCmdQueue->Construct(); + TryCatch(r == E_SUCCESS, , "[%s] Unable to construct queue", GetErrorMessage(r)); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return EventDrivenThread::Construct(); + +CATCH: + if (__pImageEventListener != null) + { + delete __pImageEventListener; + __pImageEventListener = null; + } + + if (__pMutexCmd != null) + { + delete __pMutexCmd; + __pMutexCmd = null; + } + + if (__pCmdQueue != null) + { + delete __pCmdQueue; + __pCmdQueue = null; + } + AppLogDebug("EXIT with exception(%s)", GetErrorMessage(GetLastResult())); + + return E_FAILURE; +} + +void +ImageProvider::CreateInstance(void) +{ + AppLogDebug("ENTER"); + __pImageProviderInstance = new (std::nothrow) ImageProvider(); + result r = __pImageProviderInstance->Construct(); + + if (IsFailed(r) == true) + { + delete __pImageProviderInstance; + __pImageProviderInstance = null; + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + std::atexit(DestroyInstance); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageProvider::DestroyInstance(void) +{ + AppLogDebug("ENTER"); + delete __pImageProviderInstance; + __pImageProviderInstance = null; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageProvider::Release(void) +{ + AppLogDebug("ENTER"); + if (__pImageProviderInstance != null) + { + delete __pImageProviderInstance; + __pImageProviderInstance = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageProvider::RequestImage(const String& filePath, const ImageEvent* event) +{ + AppLogDebug("ENTER"); + AppLogDebug("[THREAD] Request Job - (MainThread)"); + + if ( filePath.IsEmpty() == true || event == null + || __pMutexCmd == null || __pCmdQueue == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + return; + } + __pMutexCmd->Acquire(); + + ImageJob* pImageJob = new (std::nothrow) ImageJob(); + pImageJob->Construct(filePath, ++__requestId, event); + __pCmdQueue->Add(pImageJob); + __pMutexCmd->Release(); + SendUserEvent(null, null); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageProvider::ClearImageRequests(bool appTerminating) +{ + AppLogDebug("ENTER"); + __pMutexCmd->Acquire(); + __pCmdQueue->RemoveAll(true); + __appTerminating = appTerminating; + __pMutexCmd->Release(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +bool +ImageProvider::OnStart(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +void +ImageProvider::OnStop(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageProvider::OnUserEventReceivedN(RequestId requestId, IList* pArgs) +{ + AppLogDebug("ENTER requestId(%d)", requestId); + AppLogDebug("[THREAD] Receive Job Message - (SubThread)"); + ImageJob* pImageJob = null; + + if (__pMutexCmd == null || __pCmdQueue == null) + { + delete pArgs; + return; + } + + __pMutexCmd->Acquire(); + if (__pCmdQueue->GetCount() > 0) + { + pImageJob = static_cast(__pCmdQueue->GetAt(0)); + if (pImageJob == null) + { + __pCmdQueue->RemoveAt(0); + __pMutexCmd->Release(); + return; + } + + unsigned long requestIdForChecking = pImageJob->GetRequestId(); + String filePath = pImageJob->GetFilePath(); + __pMutexCmd->Release(); + + Bitmap* pBitmap = GetImageByDecodeN(filePath); + + __pMutexCmd->Acquire(); + pImageJob = static_cast(__pCmdQueue->GetAt(0)); + if (pImageJob != null) + { + if (requestIdForChecking == pImageJob->GetRequestId()) + { + ImageEvent* pImageEvent = const_cast(pImageJob->GetEvent()); + if (pImageEvent != null && __appTerminating == false) + { + ImageEventArg* pSendingArg = new (std::nothrow)ImageEventArg(filePath, pBitmap); + pImageEvent->Fire(*pSendingArg); + } + else + { + delete pBitmap; + } + __pCmdQueue->RemoveAt(0, true); + } + else + { + delete pBitmap; + } + } + else + { + delete pBitmap; + } + } + __pMutexCmd->Release(); + delete pArgs; + + AppLogDebug("EXIT(%s) requestId(%d)", GetErrorMessage(GetLastResult()), requestId); +} + +Bitmap* +ImageProvider::GetImageByDecodeN(const String& filePath) const +{ + AppLogDebug("ENTER filePath(%ls)", filePath.GetPointer()); + Bitmap* pBitmap = null; + if (filePath.GetLength() > 4) + { + ImageViewerMediaType mediaType = CommonUtil::GetMediaType(filePath); + if (mediaType == IMAGE_VIEWER_MEDIA_TYPE_IMAGE) + { + ImageBuffer pImageBuffer; + result r = pImageBuffer.Construct(filePath); + if (r == E_SUCCESS) + { + pBitmap = pImageBuffer.GetBitmapN(BITMAP_PIXEL_FORMAT_ARGB8888, BUFFER_SCALING_AUTO); + } + } + else if (mediaType == IMAGE_VIEWER_MEDIA_TYPE_VIDEO) + { + VideoFrameExtractor extractor; + result r = extractor.Construct(filePath, MEDIA_PIXEL_FORMAT_RGB565LE); + if (r == E_SUCCESS) + { + ImageBuffer* pImageBuffer = extractor.GetFrameN(0); + if (pImageBuffer != null) + { + pBitmap = pImageBuffer->GetBitmapN(BITMAP_PIXEL_FORMAT_RGB565, BUFFER_SCALING_AUTO); + delete pImageBuffer; + } + } + } + } + AppLogDebug("EXIT(%s) pBitmap(%x)", GetErrorMessage(GetLastResult()), pBitmap); + + return pBitmap; +} + diff --git a/src/IvImageSetterForm.cpp b/src/IvImageSetterForm.cpp new file mode 100644 index 0000000..0b81eaf --- /dev/null +++ b/src/IvImageSetterForm.cpp @@ -0,0 +1,449 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageSetterForm.cpp + * @brief This is the implementation file for ImageSetterForm class. + */ + +#include +#include +#include "IvImageViewerPresentationModel.h" +#include "IvImageSetterForm.h" +#include "IvResourceManager.h" +#include "IvTypes.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::App; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; +using namespace Tizen::Graphics; +using namespace Tizen::Io; +using namespace Tizen::Media; +using namespace Tizen::Social; +using namespace Tizen::System; + +static const unsigned int COLOR_SET_BUTTON = Color32<0, 0, 0, 100>::Value; + +static const int SET_BUTTON_WIDTH = 86; +static const int SET_BUTTON_HEIGHT = 86; +static const int ID_BUTTON_SET = 101; +static const int ID_BUTTON_CANCEL = 102; + +static const int GALLERY_INDEX_ZERO = 0; +static const int GALLERY_CONTROL_DURATION = 3000; + +static const int MAX_GALLEY_ITEM_COUNT = 1; + +ImageSetterForm::ImageSetterForm() + : __pSetButton(null) + , __pCancelButton(null) + , __pGallery(null) + , __statusValue(0) + , __currentImageIndex(0) + , __contentId(0) + , __currentBitmap(null) + , __pPresentationModel(null) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +ImageSetterForm::~ImageSetterForm() +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +ImageSetterForm::Initialize(void) +{ + AppLogDebug("ENTER"); + result r = Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +ImageSetterForm::OnInitializing(void) +{ + AppLogDebug("ENTER"); + SetFormBackEventListener(this); + + result r = SetActionBarsTranslucent(FORM_ACTION_BAR_INDICATOR, true); + SetOrientation(ORIENTATION_AUTOMATIC); + AddOrientationEventListener(*this); + + __pPresentationModel = ImageViewerPresentationModel::GetInstance(); + __currentImageIndex = __pPresentationModel->GetSetterIndex(); + CreateGallery(); + InitializeButton(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +void +ImageSetterForm::CreateGallery(void) +{ + AppLogDebug("ENTER"); + Rectangle clientRect = GetClientAreaBounds(); + Rectangle rect = GetBounds(); + + __pGallery = new (std::nothrow) Gallery(); + __pGallery->Construct(Rectangle(0, -clientRect.y, rect.width, rect.height)); + __pGallery->SetItemProvider(*this); + __pGallery->AddGalleryEventListener(*this); + AddControl(*__pGallery); + + __pGallery->SetTextOfEmptyGallery(ResourceManager::GetString(L"IDS_COM_BODY_LOADING")); + __pGallery->SetSlideShowAnimation(GALLERY_ANIMATION_DISSOLVE); + __pGallery->SetSlideShowViewDuration(GALLERY_CONTROL_DURATION); + __pGallery->SetZoomingEnabled(false); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +ImageSetterForm::InitializeButton(void) +{ + AppLogDebug("ENTER"); + __pSetButton = new (std::nothrow) Button(); + + Rectangle rect = GetBounds(); + + if (__pSetButton != null) + { + __pSetButton->Construct(Rectangle(29, rect.height - 168, SET_BUTTON_WIDTH, SET_BUTTON_HEIGHT)); + __pSetButton->SetActionId(ID_BUTTON_SET); + AddControl(*__pSetButton); + + Bitmap* pNormalBackgroundBitmap = ResourceManager::GetBitmapN(IDB_IMAGE_SETTERFORM_BUTTON_SET); + Bitmap* pPressedBackgroundBitmap = ResourceManager::GetBitmapN(IDB_IMAGE_SETTERFORM_BUTTON_SET_PRESS); + + __pSetButton->SetNormalBackgroundBitmap(*pNormalBackgroundBitmap); + __pSetButton->SetPressedBackgroundBitmap(*pPressedBackgroundBitmap); + + delete pNormalBackgroundBitmap; + pNormalBackgroundBitmap = null; + delete pPressedBackgroundBitmap; + pPressedBackgroundBitmap = null; + + __pSetButton->SetColor(BUTTON_STATUS_NORMAL, COLOR_SET_BUTTON); + __pSetButton->SetColor(BUTTON_STATUS_PRESSED, COLOR_SET_BUTTON); + __pSetButton->AddActionEventListener(*this); + } + + __pCancelButton = new (std::nothrow) Button(); + if (__pCancelButton != null) + { + __pCancelButton->Construct(Rectangle(rect.width - 115, rect.height - 168, SET_BUTTON_WIDTH, SET_BUTTON_HEIGHT)); + __pCancelButton->SetActionId(ID_BUTTON_CANCEL); + AddControl(*__pCancelButton); + + Bitmap* pNormalBackgroundBitmap = ResourceManager::GetBitmapN(IDB_IMAGE_SETTERFORM_BUTTON_CANCEL); + Bitmap* pPressedBackgroundBitmap = ResourceManager::GetBitmapN(IDB_IMAGE_SETTERFORM_BUTTON_CANCEL_PRESS); + + __pCancelButton->SetNormalBackgroundBitmap(*pNormalBackgroundBitmap); + __pCancelButton->SetPressedBackgroundBitmap(*pPressedBackgroundBitmap); + + delete pNormalBackgroundBitmap; + pNormalBackgroundBitmap = null; + delete pPressedBackgroundBitmap; + pPressedBackgroundBitmap = null; + + __pCancelButton->AddActionEventListener(*this); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +ImageSetterForm::OnOrientationChanged(const Control &source, OrientationStatus orientationStatus) +{ + AppLogDebug("ENTER"); + Rectangle clientRect = GetClientAreaBounds(); + Rectangle rect = GetBounds(); + + if (orientationStatus == ORIENTATION_STATUS_PORTRAIT || + orientationStatus == ORIENTATION_STATUS_PORTRAIT_REVERSE) + { + __pSetButton->SetBounds(Rectangle(29, rect.height - 168, SET_BUTTON_WIDTH, SET_BUTTON_HEIGHT)); + __pCancelButton->SetBounds(Rectangle(rect.width - 115, rect.height - 168, SET_BUTTON_WIDTH, SET_BUTTON_HEIGHT)); + } + else if (orientationStatus == ORIENTATION_STATUS_LANDSCAPE || + orientationStatus == ORIENTATION_STATUS_LANDSCAPE_REVERSE) + { + __pSetButton->SetBounds(Rectangle(140, rect.height - 168, SET_BUTTON_WIDTH, SET_BUTTON_HEIGHT)); + __pCancelButton->SetBounds(Rectangle(rect.width - 228, rect.height - 168, SET_BUTTON_WIDTH, SET_BUTTON_HEIGHT)); + } + + __pGallery->SetBounds(Rectangle(0, -clientRect.y, rect.width, rect.height)); + Draw(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +int +ImageSetterForm::GetItemCount(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return MAX_GALLEY_ITEM_COUNT; +} + +GalleryItem* +ImageSetterForm::CreateItem(int index) +{ + AppLogDebug("ENTER"); + GalleryItem* pGallery = new (std::nothrow) GalleryItem(); + + String filePath = __pPresentationModel->GetFilePathAt(__currentImageIndex); + Bitmap* pBitmap = null; + ImageBuffer pImageBuffer; + result r = pImageBuffer.Construct(filePath); + if (r == E_SUCCESS) + { + pBitmap = pImageBuffer.GetBitmapN(BITMAP_PIXEL_FORMAT_ARGB8888, BUFFER_SCALING_AUTO); + } + + __currentBitmap = pBitmap; + pGallery->Construct(*__currentBitmap, filePath); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pGallery; +} + +bool +ImageSetterForm::DeleteItem(int index, GalleryItem* pItem) +{ + AppLogDebug("ENTER"); + delete pItem; + pItem = null; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +void +ImageSetterForm::OnGalleryCurrentItemChanged(Gallery& view, int index) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageSetterForm::OnGalleryItemClicked(Gallery& view, int index) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageSetterForm::OnGallerySlideShowStarted(Gallery& gallery) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageSetterForm::OnGallerySlideShowStopped(Gallery& gallery) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +ImageSetterForm::OnTerminating(void) +{ + AppLogDebug("ENTER"); + if (__currentBitmap != null) + { + delete __currentBitmap; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +ImageSetterForm::OnActionPerformed(const Control& source, int actionId) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + + int status = __statusValue; + + String filePath = __pPresentationModel->GetFilePathAt(__currentImageIndex); + + switch (actionId) + { + case ID_BUTTON_SET: + if (status == SET_AT_TYPE_HOME_SCREEN_WALLPAPER) + { + Image image; + result r = image.Construct(); + if (r == E_SUCCESS) + { + String destPath = App::GetInstance()->GetAppRootPath() + TEMP_FILE_PATH_HOME_SCREEN_WALLPAPER; + r = image.EncodeToFile(*__currentBitmap, IMG_FORMAT_JPG, destPath, true); + if (r == E_SUCCESS) + { + r = SettingInfo::SetValue(SETTING_VALUE_HOME_SCREEN_WALLPAPER, destPath); + } + else if (r == E_OVERFLOW) + { + MessageBox messageBox; + messageBox.Construct(L"", L"File size is too big", MSGBOX_STYLE_NONE, 3000); + int modalResult = 0; + messageBox.ShowAndWait(modalResult); + } + } + } + else if (status == SET_AT_TYPE_LOCK_SCREEN_WALLPAPER) + { + Image image; + result r = image.Construct(); + if (r == E_SUCCESS) + { + String destPath = App::GetInstance()->GetAppRootPath() + TEMP_FILE_PATH_LOCK_SCREEN_WALLPAPER; + r = image.EncodeToFile(*__currentBitmap, IMG_FORMAT_JPG, destPath, true); + if (r == E_SUCCESS) + { + r = SettingInfo::SetValue(SETTING_VALUE_LOCK_SCREEN_WALLPAPER, destPath); + } + else if (r == E_OVERFLOW) + { + MessageBox messageBox; + messageBox.Construct(L"", L"File size is too big", MSGBOX_STYLE_NONE, 3000); + int modalResult = 0; + messageBox.ShowAndWait(modalResult); + } + } + } + else if (status == SET_AT_TYPE_CALLER_IMAGE) + { + Contact* pContact = null; + AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance(); + Addressbook* pAddressbook = null; + + pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID); + pContact = pAddressbook->GetContactN(__contentId); + pContact->SetThumbnail(filePath); + pAddressbook->UpdateContact(*pContact); + + delete pContact; + delete pAddressbook; + } + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_VIEWER)); + break; + case ID_BUTTON_CANCEL: + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_VIEWER)); + break; + default: + break; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageSetterForm::OnFormBackRequested(Form& source) +{ + AppLogDebug("ENTER"); + UiApp* pApp = UiApp::GetInstance(); + pApp->Terminate(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageSetterForm::OnSceneActivatedN(const SceneId& previousSceneId, + const SceneId& currentSceneId, IList* pArgs) +{ + AppLogDebug("ENTER"); + if (previousSceneId == IDSCN_IMAGE_VIEWER) + { + if (pArgs != null) + { + IEnumerator* pEnum = pArgs->GetEnumeratorN(); + if (pEnum->MoveNext() != E_SUCCESS) + { + delete pEnum; + delete pArgs; + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + Integer *pIndex = static_cast(pEnum->GetCurrent()); + if (pIndex != null) + { + __currentImageIndex = pIndex->ToInt(); + } + + if (pEnum->MoveNext() != E_SUCCESS) + { + delete pEnum; + delete pArgs; + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return; + } + Integer *pStatus = static_cast(pEnum->GetCurrent()); + if (pStatus != null) + { + __statusValue = pStatus->ToInt(); + } + + if (__statusValue == SET_AT_TYPE_CALLER_IMAGE) + { + if (pEnum->MoveNext() != E_SUCCESS) + { + delete pEnum; + delete pArgs; + AppLogDebug("EXIT 3(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + LongLong* pContentId = static_cast(pEnum->GetCurrent()); + if (pContentId != null) + { + __contentId = pContentId->ToLongLong(); + } + } + + delete pEnum; + delete pArgs; + } + } + + if (__pGallery != null) + { + __pGallery->RefreshGallery(GALLERY_INDEX_ZERO, GALLERY_REFRESH_TYPE_ITEM_MODIFY); + __pGallery->Draw(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageSetterForm::OnSceneDeactivated(const SceneId& currentSceneId, + const SceneId& nextSceneId) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} diff --git a/src/IvImageViewerApp.cpp b/src/IvImageViewerApp.cpp new file mode 100644 index 0000000..ae71192 --- /dev/null +++ b/src/IvImageViewerApp.cpp @@ -0,0 +1,233 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageViewerApp.cpp + * @brief This is the implementation file for ImageViewerApp class. + */ + +#include +#include "IvBaseForm.h" +#include "IvImageViewerApp.h" +#include "IvMainFrame.h" +#include "IvImageViewerPresentationModel.h" +#include "IvTypes.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Scenes; +using namespace Tizen::System; + +static const wchar_t* PARAM_LANGUAGE = L"http://tizen.org/setting/locale.language"; +static const wchar_t* PARAM_LOCALE = L"http://tizen.org/setting/locale.country"; + +ImageViewerApp::ImageViewerApp(void) + : __requestId(0) + , __appControlResult(APP_CTRL_RESULT_SUCCEEDED) + , __pArguments(null) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +ImageViewerApp::~ImageViewerApp(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +UiApp* +ImageViewerApp::CreateInstance(void) +{ + AppLogDebug("ENTER"); + UiApp* pUiApp = new (std::nothrow) ImageViewerApp(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + return pUiApp; +} + +String +ImageViewerApp::GetAppControlOperationId(void) const +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + return __operationId; +} + +String +ImageViewerApp::GetUriData(void) const +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + return __uriData; +} + +const IMap* +ImageViewerApp::GetAppControlArguments(void) const +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + return __pArguments; +} + +bool +ImageViewerApp::OnAppInitializing(AppRegistry& appRegistry) +{ + AppLogDebug("ENTER"); + AppControlProviderManager::GetInstance()->SetAppControlProviderEventListener(this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +bool +ImageViewerApp::OnAppInitialized(void) +{ + AppLogDebug("ENTER"); + MainFrame* pMainFrame = new (std::nothrow) MainFrame(); + pMainFrame->Construct(); + AddFrame(*pMainFrame); + + SettingInfo::AddSettingEventListener(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +bool +ImageViewerApp::OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination) +{ + AppLogDebug("ENTER"); + ImageViewerPresentationModel* pPresentationModel = ImageViewerPresentationModel::GetInstance(); + if (pPresentationModel != null) + { + pPresentationModel->ClearImageRequests(true); + } + + Thread::Sleep(1000); + + delete __pArguments; + __pArguments = null; + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +void +ImageViewerApp::OnForeground(void) +{ + AppLogDebug("ENTER"); + static bool bFirst = true; + if (bFirst) + { + bFirst = false; + return; + } + + MainFrame* pMainFrame = dynamic_cast(GetFrameAt(0)); + pMainFrame->SetEnabled(true); + pMainFrame->Invalidate(true); + + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + + Scene* pScene = pSceneManager->GetCurrentScene(); + AppAssert(pSceneManager); + + BaseForm* pBaseForm = dynamic_cast(pScene->GetForm()); + if (pBaseForm != null) + { + pBaseForm->OnUpdateContentList(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerApp::OnAppControlRequestReceived(RequestId reqId, const String& operationId, + const String* pUriData, const String* pMimeType, const IMap* pExtraData) +{ + AppLogDebug("ENTER"); + __requestId = reqId; + __operationId = operationId; + + if (pUriData != null) + { + __uriData = *pUriData; + } + if (pExtraData != null) + { + HashMap* pArguments = new (std::nothrow) HashMap(SingleObjectDeleter); + result r = pArguments->Construct(); + if (r != E_SUCCESS) + { + delete pArguments; + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + const String* pKey = null; + const String* pValue = null; + IList* pKeyList = pExtraData->GetKeysN(); + + if (pKeyList != null) + { + int loopCount = pKeyList->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + pKey = static_cast(pKeyList->GetAt(i)); + if (pKey != null) + { + pValue = static_cast(pExtraData->GetValue(*pKey)); + AppLogDebug("(%ls:%ls)", pKey == null ? L"(null)" : pKey->GetPointer(), pValue == null ? L"(null)" : pValue->GetPointer()); + if (pValue != null && pKey->CompareTo(APPCONTROL_KEY_LEGACY_RESULT) != 0) + { + pArguments->Add(new (std::nothrow) String(*pKey), new (std::nothrow) String(*pValue)); + } + } + } + __pArguments = pArguments; + delete pKeyList; + } + else + { + delete pArguments; + pArguments = null; + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerApp::OnSettingChanged(String& key) +{ + AppLogDebug("ENTER"); + if (key.CompareTo(PARAM_LANGUAGE) == 0 || key.CompareTo(PARAM_LOCALE) == 0) + { + UiApp::GetInstance()->Terminate(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerApp::SetFrameEnabled(bool enabled) +{ + MainFrame* pMainFrame = dynamic_cast(GetFrameAt(0)); + pMainFrame->SetEnabled(enabled); +} diff --git a/src/IvImageViewerEntry.cpp b/src/IvImageViewerEntry.cpp new file mode 100644 index 0000000..efa3f26 --- /dev/null +++ b/src/IvImageViewerEntry.cpp @@ -0,0 +1,57 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageViewerEntry.cpp + * @brief This is the implementation file for ImageViewerEntry class. + */ + +#include "IvImageViewerApp.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +// +// The entry function of Tizen application called by the operating system. +// +_EXPORT_ int +OspMain(int argc, char *pArgv[]) +{ + AppLogDebug("ENTER"); + AppLogDebug("Application started."); + ArrayList args(SingleObjectDeleter); + args.Construct(); + for (int i = 0; i < argc; i++) + { + args.Add(new (std::nothrow) String(pArgv[i])); + } + + result r = UiApp::Execute(ImageViewerApp::CreateInstance, &args); + TryLog(r == E_SUCCESS, "[%s] Application execution failed", GetErrorMessage(r)); + AppLogDebug("Application finished."); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return static_cast(r); +} +#ifdef __cplusplus +} +#endif // __cplusplus diff --git a/src/IvImageViewerForm.cpp b/src/IvImageViewerForm.cpp new file mode 100644 index 0000000..756dd5e --- /dev/null +++ b/src/IvImageViewerForm.cpp @@ -0,0 +1,1916 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageViewerForm.cpp + * @brief This is the implementation file for ImageViewerForm class. + */ + +#include +#include "IvCommonUtil.h" +#include "IvImageInfo.h" +#include "IvImageViewerApp.h" +#include "IvImageViewerForm.h" +#include "IvImageViewerPresentationModel.h" +#include "IvResourceManager.h" +#include "IvTypes.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::Content; +using namespace Tizen::Graphics; +using namespace Tizen::Io; +using namespace Tizen::Media; +using namespace Tizen::System; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; + +static const unsigned int COLOR_HEADER_CONTORL_PANEL = Color32<0, 0, 0, 100>::Value; +static const unsigned int COLOR_HEADER_BUTTON1 = Color32<0, 0, 0, 100>::Value; + +static const Rectangle RECT_CONTORL_BUTTON_PLAY (280, 400, 160, 160); +static const Rectangle RECT_LANDSCAP_CONTORL_BUTTON_PLAY (560, 216, 160, 160); + +static const Rectangle RECT_DETAILS_CONTORL_PANEL (0, 0, 720, 1008); +static const Rectangle RECT_LANDSCAPE_DETAILS_CONTORL_PANEL (0, 0, 1280, 484); +static const Rectangle RECT_DETAILS_CONTORL_LABEL (20, 0, 200, 48); + +static const int GAP_LABEL_END = 60; +static const int GAP_W_POPUP_ITEM = 5; +static const int W_DELETE_POPUP = 600; +static const int H_DELETE_POPUP = 300; +static const int H_DELETE_LABEL = 180; +static const int Y_DELETE_BUTTON = 180; +static const int H_DELETE_BUTTON = 80; + +static const Dimension DUMMY_IMAGE_DIMENSION (720, 1280); +static const Rectangle DUMMY_IMAGE_RECTANGLE (0, 0, 720, 1280); + +static const int PAGE_NO_CONTENT_SEARCH = 1; +static const int COUNT_PER_PAGE_CONTENT_SEARCH = 10; + +static const int FORMAT_BUFFER_SIZE = 256; + +static const long long SINGLE_GIGA_BYTE = (1024 * 1024 * 1024); +static const long long SINGLE_MEGA_BYTE = (1024 * 1024); +static const long long SINGLE_KILO_BYTE = 1024; + +static const int Y_RENAME_BUTTON = 100; +static const int H_RENAME_BUTTON = 64; +static const int W_RENAME_BUTTON = 64; + +static const int X_DETAIL_FILEINFO_LABEL = 20; +static const int W_DETAIL_FILEINFO_LABEL = 420; +static const int H_DETAIL_FILEINFO_LABEL = 50; +static const int H_DETAIL_MAIN_TEXT = 48; +static const int H_DETAIL_SUB_TEXT = 42; +static const int GAP_H_DETAIL_TEXT = 8; +static const int W_DETAIL_FILEINFO_VALUE_LABEL = 650; +static const int H_DETAIL_FILEINFO_VALUE_LABEL = 56; + +static const int X_MORE = 55; + +static const int DETAIL_SUB_FONT_SIZE = 42; +static const int DETAIL_MAIN_FONT_SIZE = 48; +static const int DETAIL_COUNT_MAX = 9; + +ImageViewerForm::ImageViewerForm(void) + : __initializeDisplayModeCurrent(APPCONTROL_MODE_NORMAL) + , __pHeader(null) + , __pFooter(null) + , __pScrollPanel(null) + , __pDetail_Label(null) + , __pLabelMessage(null) + , __pPlayButton(null) + , __pRenameButton(null) + , __pDetailFooterItem(null) + , __pGallery(null) + , __pTimer(null) + , __pDecodeBitmap(null) + , __pContextMenuMore(null) + , __pContextMenuCopy(null) + , __pContextMenuSetAs(null) + , __pContextMenuShare(null) + , __pDeletePopup(null) + , __visible(true) + , __detail(true) + , __startSlide(false) + , __requestId(0) + , __pPresentationModel(null) +{ + AppLogDebug("ENTER"); + + __pDetail_FileInfo_Value_Label[0] = null; + __pDetail_FileInfo_Value_Label[1] = null; + __pDetail_FileInfo_Value_Label[2] = null; + __pDetail_FileInfo_Value_Label[3] = null; + __pDetail_FileInfo_Value_Label[4] = null; + __pDetail_FileInfo_Value_Label[5] = null; + __pDetail_FileInfo_Value_Label[6] = null; + __pDetail_FileInfo_Value_Label[7] = null; + __pDetail_FileInfo_Value_Label[8] = null; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +ImageViewerForm::~ImageViewerForm(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +ImageViewerForm::Initialize() +{ + AppLogDebug("ENTER"); + __pPresentationModel = ImageViewerPresentationModel::GetInstance(); + + if (__pPresentationModel->GetFileCount() > 0) + { + if (__pPresentationModel->GetType() == APPCONTROL_DATA_SLIDE_SHOW) + { + __startSlide = true; + } + } + + int startIndex = __pPresentationModel->GetStartIndex(); + String filePath = __pPresentationModel->GetFilePathAt(startIndex); + + if (filePath.StartsWith(WEB_URL_HTTP, 0) == true) + { + __initializeDisplayModeCurrent = APPCONTROL_MODE_WEB_LINK; + } + else if (__pPresentationModel->GetType() == APPCONTROL_DATA_EMAIL) + { + __initializeDisplayModeCurrent = APPCONTROL_MODE_EMAIL; + } + else + { + __initializeDisplayModeCurrent = APPCONTROL_MODE_NORMAL; + } + + result r = Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER); + if (r == E_SUCCESS) + { + SetOrientation(ORIENTATION_AUTOMATIC); + } + + if (filePath == EMPTY_SPACE) + { + MessageBox messageBox; + messageBox.Construct(L"", ResourceManager::GetString(L"IDS_IV_POP_INVALID_IMAGE_FILE"), MSGBOX_STYLE_NONE, + 3000); + int modalResult = 0; + messageBox.ShowAndWait(modalResult); + + UiApp* pApp = UiApp::GetInstance(); + pApp->Terminate(); + } + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +ImageViewerForm::OnInitializing(void) +{ + AppLogDebug("ENTER"); + SetFormBackEventListener(this); + __pPresentationModel->AddListener(this); + + CreateGallery(); + InitializeDisplay(__initializeDisplayModeCurrent); + InitializePanelDetail(); + InitializePopup(); + + if ( __initializeDisplayModeCurrent == APPCONTROL_MODE_NORMAL + || __initializeDisplayModeCurrent == APPCONTROL_MODE_EMAIL) + { + int index = __pPresentationModel->GetStartIndex(); + __pGallery->UpdateGallery(); + __pGallery->SetCurrentItemIndex(index); + __pGallery->Draw(); + + String filePath = __pPresentationModel->GetFilePathAt(index); + __pPresentationModel->RequestImage(filePath); + } + else if (__initializeDisplayModeCurrent == APPCONTROL_MODE_WEB_LINK) + { + RequestDecodeUrl(); + } + + if (__startSlide) + { + __pTimer = new (std::nothrow) Timer(); + __pTimer->Construct(*this); + __pTimer->Start(1); + } + + result r = SetActionBarsTranslucent(FORM_ACTION_BAR_INDICATOR, true); + AddOrientationEventListener(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +ImageViewerForm::OnInitialized(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +ImageViewerForm::OnOrientationChanged(const Control &source, OrientationStatus orientationStatus) +{ + AppLogDebug("ENTER"); + if (__detail == false) + { + ShowPanelDetail(true); + } + else + { + ShowPanelDetail(false); + } + + if (orientationStatus == ORIENTATION_STATUS_PORTRAIT || + orientationStatus == ORIENTATION_STATUS_PORTRAIT_REVERSE) + { + Rectangle clientRect = GetClientAreaBounds(); + Rectangle rect = GetBounds(); + + __pGallery->SetBounds(Rectangle(0, -clientRect.y, rect.width, rect.height)); + __pPlayButton->SetBounds(Rectangle(RECT_CONTORL_BUTTON_PLAY.x, RECT_CONTORL_BUTTON_PLAY.y, + RECT_CONTORL_BUTTON_PLAY.width, RECT_CONTORL_BUTTON_PLAY.height)); + + Invalidate(true); + } + else if (orientationStatus == ORIENTATION_STATUS_LANDSCAPE || + orientationStatus == ORIENTATION_STATUS_LANDSCAPE_REVERSE) + { + Rectangle clientRect = GetClientAreaBounds(); + Rectangle rect = GetBounds(); + + __pGallery->SetBounds(Rectangle(0, -clientRect.y, rect.width, rect.height)); + __pPlayButton->SetBounds(Rectangle(RECT_LANDSCAP_CONTORL_BUTTON_PLAY.x, RECT_LANDSCAP_CONTORL_BUTTON_PLAY.y, + RECT_LANDSCAP_CONTORL_BUTTON_PLAY.width, RECT_LANDSCAP_CONTORL_BUTTON_PLAY.height)); + + Invalidate(true); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::InitializeDisplay(AppControlMode status) +{ + AppLogDebug("ENTER"); + String strItemText; + String strItemIdxText; + + __pHeader = GetHeader(); + __pHeader->AddActionEventListener(*this); + + __pFooter = GetFooter(); + __pFooter->AddActionEventListener(*this); + __pFooter->RemoveAllItems(); + + GetHeaderString(0, strItemText, strItemIdxText); + Rectangle rect = GetClientAreaBounds(); + __pHeader->SetTitleText(strItemText); + __pHeader->SetDescriptionText(strItemIdxText); + + if (status == APPCONTROL_MODE_NORMAL) + { + __pPlayButton = new (std::nothrow) Button(); + if (__pPlayButton != null) + { + __pPlayButton->Construct(RECT_CONTORL_BUTTON_PLAY); + __pPlayButton->SetActionId(ACTION_ID_CONTORL_BUTTON_PLAY); + AddControl(*__pPlayButton); + + Bitmap* pNormalBackgroundBitmap = ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_BUTTON_PLAY); + __pPlayButton->SetNormalBackgroundBitmap(*pNormalBackgroundBitmap); + delete pNormalBackgroundBitmap; + + Bitmap* pPressedBackgroundBitmap = ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_BUTTON_PLAY); + __pPlayButton->SetPressedBackgroundBitmap(*pPressedBackgroundBitmap); + delete pPressedBackgroundBitmap; + + __pPlayButton->AddActionEventListener(*this); + __pPlayButton->SetShowState(false); + } + + __pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT); + __pFooter->RemoveButtonAt(BUTTON_POSITION_LEFT); + __pFooter->SetBackButton(); + + FooterItem footerItem1; + footerItem1.Construct(ACTION_ID_FOOTER_BUTTON_SHARE); + Bitmap* pFooterItemShareNomal = + ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_FOOTER_ICON_SHARE_NORMAL); + footerItem1.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pFooterItemShareNomal); + + FooterItem footerItem2; + footerItem2.Construct(ACTION_ID_FOOTER_BUTTON_DELETE); + Bitmap* pFooterItemDeleteNomal = + ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_FOOTER_ICON_DELETE_NORMAL); + footerItem2.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pFooterItemDeleteNomal); + + __pFooter->AddItem(footerItem1); + __pFooter->AddItem(footerItem2); + + delete pFooterItemShareNomal; + delete pFooterItemDeleteNomal; + + ButtonItem buttonItemMore; + buttonItemMore.Construct(BUTTON_ITEM_STYLE_ICON, ACTION_ID_FOOTER_MORE); + buttonItemMore.SetBackgroundBitmap(BUTTON_ITEM_STATUS_NORMAL, + ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_MORE_NORMAL)); + buttonItemMore.SetBackgroundBitmap(BUTTON_ITEM_STATUS_PRESSED, + ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_MORE_PRESSED)); + __pFooter->SetButton(BUTTON_POSITION_LEFT, buttonItemMore); + } + else if (status == APPCONTROL_MODE_WEB_LINK) + { + __pFooter->RemoveButtonAt(BUTTON_POSITION_LEFT); + __pFooter->SetBackButton(); + + FooterItem footerItem1; + footerItem1.Construct(ACTION_ID_FOOTER_BUTTON_SHARE); + Bitmap* pFooterItemShareNomal = + ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_FOOTER_ICON_SHARE_NORMAL); + footerItem1.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pFooterItemShareNomal); + + FooterItem footerItem2; + footerItem2.Construct(ACTION_ID_FOOTER_BUTTON_DOWNLOAD); + Bitmap* pFooterItemDownlordNomal = ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_BUTTON_DOWNLOAD); + footerItem2.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pFooterItemDownlordNomal); + + __pFooter->AddItem(footerItem1); + __pFooter->AddItem(footerItem2); + + delete pFooterItemShareNomal; + delete pFooterItemDownlordNomal; + + ButtonItem buttonItemMore; + buttonItemMore.Construct(BUTTON_ITEM_STYLE_ICON, ACTION_ID_FOOTER_MORE); + buttonItemMore.SetBackgroundBitmap(BUTTON_ITEM_STATUS_NORMAL, + ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_MORE_NORMAL)); + buttonItemMore.SetBackgroundBitmap(BUTTON_ITEM_STATUS_PRESSED, + ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_MORE_PRESSED)); + __pFooter->SetButton(BUTTON_POSITION_LEFT, buttonItemMore); + + __pFooter->AddItem(footerItem1); + __pFooter->AddItem(footerItem2); + } + else if (status == APPCONTROL_MODE_CROP) + { + FooterItem footerItem1; + footerItem1.Construct(ACTION_ID_FOOTER_BUTTON_SAVE); + Bitmap* pfooterItem1 = ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_BUTTON_SAVE); + footerItem1.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pfooterItem1); + + FooterItem footerItem2; + footerItem2.Construct(ACTION_ID_FOOTER_BUTTON_BACK); + Bitmap* pfooterItem2 = ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_BUTTON_X); + footerItem2.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pfooterItem2); + + __pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON); + __pFooter->AddItem(footerItem1); + __pFooter->AddItem(footerItem2); + + delete pfooterItem1; + delete pfooterItem2; + } + else if (status == APPCONTROL_MODE_EMAIL) + { + __pPlayButton = new (std::nothrow) Button(); + if (__pPlayButton != null) + { + __pPlayButton->Construct(RECT_CONTORL_BUTTON_PLAY); + __pPlayButton->SetActionId(ACTION_ID_CONTORL_BUTTON_PLAY); + AddControl(*__pPlayButton); + + Bitmap* pNormalBackgroundBitmap = ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_BUTTON_PLAY); + __pPlayButton->SetNormalBackgroundBitmap(*pNormalBackgroundBitmap); + delete pNormalBackgroundBitmap; + + Bitmap* pPressedBackgroundBitmap = ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_BUTTON_PLAY); + __pPlayButton->SetPressedBackgroundBitmap(*pPressedBackgroundBitmap); + delete pPressedBackgroundBitmap; + + __pPlayButton->AddActionEventListener(*this); + __pPlayButton->SetShowState(false); + } + + __pFooter->SetBackButton(); + } + + String filePath = __pPresentationModel->GetFilePathAt(0); + ContentType contentType = ContentManagerUtil::CheckContentType(filePath); + if (contentType == CONTENT_TYPE_VIDEO) + { + __pPlayButton->SetShowState(true); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::GetHeaderString(int index, String &fileName, String &page) +{ + AppLogDebug("ENTER"); + int allCount = __pPresentationModel->GetFileCount(); + String pStr = __pPresentationModel->GetFilePathAt(index); + fileName = __pPresentationModel->GetFileName(pStr); + page.Format(FORMAT_BUFFER_SIZE, L"%d/%d", index + 1, allCount); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +ImageViewerForm::DeleteImageFile() +{ + AppLogDebug("ENTER"); + int currentIndex = __pGallery->GetCurrentItemIndex(); + + String strItemText(EMPTY_SPACE); + String strItemIdxText(EMPTY_SPACE); + int countPath = __pPresentationModel->GetFileCount(); + String filePath = __pPresentationModel->GetFilePathAt(currentIndex); + result r = E_SUCCESS; + if (filePath.GetLength() == 0) + { + UiApp* pApp = UiApp::GetInstance(); + pApp->Terminate(); + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return E_FAILURE; + } + + if (filePath.StartsWith(Environment::GetMediaPath(), 0) == true + || filePath.StartsWith(Environment::GetExternalStoragePath(), 0) == true) + { + ContentId contentId = __pPresentationModel->GetFileContentId(filePath); + ContentManager contentManager; + contentManager.Construct(); + r = contentManager.DeleteContent(contentId); + if (r != E_SUCCESS) + { + r = File::Remove(filePath); + if (r != E_SUCCESS) + { + MessageBox messageBox; + messageBox.Construct(L"", ResourceManager::GetString(L"IDS_COM_POP_DELETE_FAILED"), + MSGBOX_STYLE_NONE, 3000); + int modalResult = 0; + messageBox.ShowAndWait(modalResult); + AppLogDebug("EXIT 4(%s)", GetErrorMessage(GetLastResult())); + + return r; + } + } + } + else + { + r = File::Remove(filePath); + } + + __pPresentationModel->DeleteFilePathAt(currentIndex); + if (countPath == 1) + { + UiApp* pApp = UiApp::GetInstance(); + pApp->Terminate(); + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return r; + } + else if ((countPath - 1) == currentIndex) + { + __pGallery->SetCurrentItemIndex(--currentIndex); + } + + __pGallery->UpdateGallery(); + filePath = __pPresentationModel->GetFilePathAt(currentIndex); + __pPresentationModel->RequestImage(filePath); + + GetHeaderString(__pGallery->GetCurrentItemIndex(), strItemText, strItemIdxText); + __pHeader->SetTitleText(strItemText); + __pHeader->SetDescriptionText(strItemIdxText); + + if (__visible == true) + { + ImageViewerMediaType mediaType = CommonUtil::GetMediaType(filePath); + + if (mediaType == IMAGE_VIEWER_MEDIA_TYPE_IMAGE) + { + __pPlayButton->SetShowState(false); + } + else + { + __pPlayButton->SetShowState(true); + } + } + Invalidate(true); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +void +ImageViewerForm::CallVideoPlayer(void) +{ + AppLogDebug("ENTER"); + int index = __pGallery->GetCurrentItemIndex(); + String filePath = __pPresentationModel->GetFilePathAt(index); + + HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); + pDataList->Construct(); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), + new (std::nothrow) String(APPCONTROL_DATA_VIDEO)); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), new (std::nothrow) String(filePath)); + + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_VIDEO_PLAYER, + APPCONTROL_OPERATION_ID_PLAY, pDataList, this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::CreateGallery(void) +{ + AppLogDebug("ENTER"); + Rectangle clientRect = GetClientAreaBounds(); + Rectangle rect = GetBounds(); + + __pGallery = new (std::nothrow) Gallery(); + __pGallery->Construct(Rectangle(0, -clientRect.y, rect.width, rect.height)); + __pGallery->SetName(L"GalleryControl"); + __pGallery->SetItemProvider(*this); + __pGallery->AddGalleryEventListener(*this); + AddControl(*__pGallery); + __pGallery->SetTextOfEmptyGallery(ResourceManager::GetString(L"IDS_COM_BODY_LOADING")); + + SlideShowTransitionEffect effect = __pPresentationModel->GetTransitionEffectOfSlideShow(); + + switch (effect) + { + case SLIDE_SHOW_TRANSITION_EFFECT_PAGE: + __pGallery->SetSlideShowAnimation(Controls::GALLERY_ANIMATION_PAGE); + break; + case SLIDE_SHOW_TRANSITION_EFFECT_DISSOLVE: + __pGallery->SetSlideShowAnimation(Controls::GALLERY_ANIMATION_DISSOLVE); + break; + case SLIDE_SHOW_TRANSITION_EFFECT_ZOOM: + __pGallery->SetSlideShowAnimation(Controls::GALLERY_ANIMATION_ZOOM); + break; + case SLIDE_SHOW_TRANSITION_EFFECT_SLIDE: + break; + } + + __pGallery->SetSlideShowViewDuration(__pPresentationModel->GetDurationOfSlideShow()); + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +ImageViewerForm::InitializePanelDetail() +{ + AppLogDebug("ENTER"); + __pScrollPanel = new (std::nothrow) ScrollPanel(); + + String arrayId[DETAIL_COUNT_MAX] = + { + L"IDS_COM_BODY_DETAILS_NAME", L"IDS_IV_BODY_FILE_FORMAT", L"IDS_IV_BODY_DATE_CREATED", + L"IDS_COM_BODY_SIZE", L"IDS_IV_BODY_RESOLUTION", L"IDS_COM_BODY_LOCATION", + L"IDS_COM_BODY_LATITUDE", L"IDS_COM_BODY_LONGITUDE", L"IDS_IV_BODY_FILE_LOCATION" + }; + + if (__pScrollPanel == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return E_INVALID_STATE; + } + + result r = __pScrollPanel->Construct(RECT_DETAILS_CONTORL_PANEL); + if (r != E_SUCCESS) + { + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return E_INVALID_STATE; + } + + __pDetail_Label = new (std::nothrow) Label(); + __pDetail_Label->Construct(RECT_DETAILS_CONTORL_LABEL, ResourceManager::GetString(L"IDS_COM_BODY_DETAILS")); + __pScrollPanel->AddControl(*__pDetail_Label); + __pDetail_Label->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); + __pDetail_Label->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + __pDetail_Label->SetTextColor(Color::GetColor(COLOR_ID_WHITE)); + __pDetail_Label->SetTextConfig(DETAIL_MAIN_FONT_SIZE, LABEL_TEXT_STYLE_NORMAL); + + for (int i = 0; i < DETAIL_COUNT_MAX; ++i) + { + __pDetail_FileInfo_Label[i] = new (std::nothrow) Label(); + __pDetail_FileInfo_Label[i]->Construct( + Rectangle(X_DETAIL_FILEINFO_LABEL, + GAP_H_DETAIL_TEXT * (i + 1) + H_DETAIL_MAIN_TEXT + (H_DETAIL_MAIN_TEXT + H_DETAIL_SUB_TEXT) * i, + W_DETAIL_FILEINFO_LABEL, H_DETAIL_FILEINFO_LABEL), ResourceManager::GetString(arrayId[i])); + __pScrollPanel->AddControl(*__pDetail_FileInfo_Label[i]); + + __pDetail_FileInfo_Label[i]->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); + __pDetail_FileInfo_Label[i]->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + __pDetail_FileInfo_Label[i]->SetTextColor(Color::GetColor(COLOR_ID_GREY)); + __pDetail_FileInfo_Label[i]->SetTextConfig(DETAIL_SUB_FONT_SIZE, LABEL_TEXT_STYLE_NORMAL); + + __pDetail_FileInfo_Value_Label[i] = new (std::nothrow) Label(); + __pDetail_FileInfo_Value_Label[i]->Construct( + Rectangle(X_DETAIL_FILEINFO_LABEL, + GAP_H_DETAIL_TEXT * (i + 1) + H_DETAIL_MAIN_TEXT + (H_DETAIL_MAIN_TEXT * i) + H_DETAIL_SUB_TEXT * (i + 1), + W_DETAIL_FILEINFO_VALUE_LABEL, H_DETAIL_FILEINFO_VALUE_LABEL), L""); + __pScrollPanel->AddControl(*__pDetail_FileInfo_Value_Label[i]); + + __pDetail_FileInfo_Value_Label[i]->SetTextVerticalAlignment(ALIGNMENT_BOTTOM); + __pDetail_FileInfo_Value_Label[i]->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + __pDetail_FileInfo_Value_Label[i]->SetTextColor(Color::GetColor(COLOR_ID_WHITE)); + __pDetail_FileInfo_Value_Label[i]->SetTextConfig(DETAIL_MAIN_FONT_SIZE, LABEL_TEXT_STYLE_NORMAL); + } + + __pScrollPanel->SetBackgroundColor(COLOR_HEADER_CONTORL_PANEL); + __pScrollPanel->SetShowState(false); + + AddControl(*__pScrollPanel); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +ImageViewerForm::InitializePopup(void) +{ + AppLogDebug("ENTER"); + if (__pDeletePopup == null) + { + __pDeletePopup = new (std::nothrow) Popup(); + __pDeletePopup->Construct(false, Dimension(W_DELETE_POPUP, H_DELETE_POPUP)); + + Rectangle popupClientBounds = __pDeletePopup->GetClientAreaBounds(); + + Label* pLabel = new (std::nothrow) Label(); + pLabel->Construct(Rectangle(0, 0, popupClientBounds.width, H_DELETE_LABEL), + ResourceManager::GetString(L"IDS_COM_BODY_DELETE") + L"?"); + + Button* pDeleteButton = new (std::nothrow) Button(); + pDeleteButton->Construct( + Rectangle(0, Y_DELETE_BUTTON, popupClientBounds.width / 2 - GAP_W_POPUP_ITEM, H_DELETE_BUTTON), + ResourceManager::GetString(L"IDS_COM_BODY_DELETE")); + pDeleteButton->SetActionId(ACTION_ID_DELETE_POPUP_DEL); + pDeleteButton->AddActionEventListener(*this); + + Button* pCancelButton = new (std::nothrow) Button(); + pCancelButton->Construct( + Rectangle(popupClientBounds.width / 2 + GAP_W_POPUP_ITEM, + Y_DELETE_BUTTON, popupClientBounds.width / 2 - GAP_W_POPUP_ITEM, H_DELETE_BUTTON), + ResourceManager::GetString(L"IDS_COM_SK_CANCEL")); + pCancelButton->SetActionId(ACTION_ID_DELETE_POPUP_CANCEL); + pCancelButton->AddActionEventListener(*this); + + __pDeletePopup->AddControl(*pLabel); + __pDeletePopup->AddControl(*pDeleteButton); + __pDeletePopup->AddControl(*pCancelButton); + } + else + { + __pDeletePopup->SetShowState(true); + __pDeletePopup->Show(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +ImageViewerForm::InitializeContextMenuMore(void) +{ + AppLogDebug("ENTER"); + int currentIndex = __pGallery->GetCurrentItemIndex(); + String filePath = __pPresentationModel->GetFilePathAt(currentIndex); + + ImageViewerMediaType mediaType = CommonUtil::GetMediaType(filePath); + + if (__pContextMenuMore != null) + { + delete __pContextMenuMore; + __pContextMenuMore = null; + } + + __pContextMenuMore = new (std::nothrow) ContextMenu(); + + __pContextMenuMore->Construct(Point(X_MORE, GetClientAreaBounds().y + GetClientAreaBounds().height), + CONTEXT_MENU_STYLE_LIST, CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD); + + if (mediaType == IMAGE_VIEWER_MEDIA_TYPE_IMAGE) + { + __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_SET_AS"), + ACTION_ID_CONTEXTMENU_SET_AS); + } + + if (__pGallery->GetItemCount() > 1) + { + __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_SLIDE_SHOW"), + ACTION_ID_FOOTER_BUTTON_SLIDE); + } + __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_DETAILS"), + ACTION_ID_FOOTER_BUTTON_DETAILS); + __pContextMenuMore->SetShowState(false); + __pContextMenuMore->AddActionEventListener(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +ImageViewerForm::InitializeContextMenuSetAs(void) +{ + AppLogDebug("ENTER"); + + if (__pContextMenuSetAs != null) + { + delete __pContextMenuSetAs; + __pContextMenuSetAs = null; + } + + __pContextMenuSetAs = new (std::nothrow) ContextMenu(); + __pContextMenuSetAs->Construct(Point(X_MORE, GetClientAreaBounds().y + GetClientAreaBounds().height), + CONTEXT_MENU_STYLE_LIST, CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD); + + __pContextMenuSetAs->AddItem(ResourceManager::GetString(L"IDS_IV_HEADER_HOME_SCREEN_WALLPAPER_ABB"), + ACTION_ID_CONTEXTMENU_HOME); + __pContextMenuSetAs->AddItem(ResourceManager::GetString(L"IDS_IV_HEADER_LOCK_SCREEN_WALLPAPER_ABB"), + ACTION_ID_CONTEXTMENU_LOCK); + __pContextMenuSetAs->AddItem(ResourceManager::GetString(L"IDS_IV_BODY_CALLER_IMAGE"), + ACTION_ID_CONTEXTMENU_CALLER); + __pContextMenuSetAs->AddActionEventListener(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +ImageViewerForm::InitializeContextMenuShare(void) +{ + AppLogDebug("ENTER"); + if (__pContextMenuShare != null) + { + delete __pContextMenuShare; + __pContextMenuShare = null; + } + __pContextMenuShare = new (std::nothrow) ContextMenu(); + __pContextMenuShare->Construct(Point((GetClientAreaBounds().width - (X_MORE * 4)) / 4 + X_MORE * 2, + GetClientAreaBounds().y + GetClientAreaBounds().height), CONTEXT_MENU_STYLE_LIST, + CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD); + + __pContextMenuShare->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_EMAIL"),ACTION_ID_CONTEXTMENU_EMAIL); + __pContextMenuShare->AddActionEventListener(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +long long +ImageViewerForm::GetFileSize(String filePath) +{ + AppLogDebug("ENTER"); + FileAttributes attr; + long long size = 0; + + result r = File::GetAttributes(filePath, attr); + if (r != E_SUCCESS) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return 0; + } + size = attr.GetFileSize(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return size; +} + +result +ImageViewerForm::SetDetailInfo(void) +{ + AppLogDebug("ENTER"); + + Rectangle clientRect = GetClientAreaBounds(); + AppLogDebug("PORTRAIT GetClientAreaBounds(%d %d %d %d)", clientRect.x, clientRect.y, clientRect.width, clientRect.height); + OrientationStatus currentOrientaton = GetOrientationStatus(); + + if (currentOrientaton == ORIENTATION_STATUS_LANDSCAPE || currentOrientaton == ORIENTATION_STATUS_LANDSCAPE_REVERSE) + { + __pScrollPanel->SetBounds(Rectangle(0, 0, clientRect.width, RECT_LANDSCAPE_DETAILS_CONTORL_PANEL.height)); + } + else + { + __pScrollPanel->SetBounds(0, 0, clientRect.width, RECT_DETAILS_CONTORL_PANEL.height); + } + + int currentIndex = __pGallery->GetCurrentItemIndex(); + String strFilePath = __pPresentationModel->GetFilePathAt(currentIndex); + + ImageViewerMediaType mediaType = CommonUtil::GetMediaType(strFilePath); + + String strResult[DETAIL_COUNT_MAX] = {EMPTY_SPACE, }; + + strResult[0] = __pPresentationModel->GetFileName(strFilePath); + strResult[1] = ResourceManager::GetString(L"IDS_COM_BODY_UNKNOWN"); + + FileAttributes attr; + result r = File::GetAttributes(strFilePath, attr); + if (r == E_SUCCESS) + { + long long nSize = attr.GetFileSize(); + DateTime dateTime = attr.GetDateTime(); + strResult[2] = dateTime.ToString(); + + if (nSize > SINGLE_GIGA_BYTE) + { + strResult[3].Format(FORMAT_BUFFER_SIZE, L"%lld GB", nSize / SINGLE_GIGA_BYTE); + } + else if (nSize > SINGLE_MEGA_BYTE) + { + strResult[3].Format(FORMAT_BUFFER_SIZE, L"%lld MB", nSize / SINGLE_MEGA_BYTE); + } + else if (nSize > SINGLE_KILO_BYTE) + { + strResult[3].Format(FORMAT_BUFFER_SIZE, L"%lld KB", nSize / SINGLE_KILO_BYTE); + } + else + { + strResult[3].Format(FORMAT_BUFFER_SIZE, L"%lld Byte", nSize); + } + } + else + { + strResult[2] = ResourceManager::GetString(L"IDS_COM_BODY_UNKNOWN"); + strResult[3] = ResourceManager::GetString(L"IDS_COM_BODY_UNKNOWN"); + } + + strResult[4] = ResourceManager::GetString(L"IDS_COM_BODY_UNKNOWN"); + strResult[5] = ResourceManager::GetString(L"IDS_COM_BODY_UNKNOWN"); + strResult[6] = ResourceManager::GetString(L"IDS_COM_BODY_UNKNOWN"); + strResult[7] = ResourceManager::GetString(L"IDS_COM_BODY_UNKNOWN"); + strResult[8] = strFilePath; + + if (__initializeDisplayModeCurrent == APPCONTROL_MODE_WEB_LINK) + { + strResult[0] = __downLordFileName; + } + else if (mediaType == IMAGE_VIEWER_MEDIA_TYPE_IMAGE) + { + ImageMetadata* pImgMeta = ContentManagerUtil::GetImageMetaN(strFilePath); + + if (pImgMeta != null) + { + ImageContentInfo imageContentInfo; + r = imageContentInfo.Construct(&strFilePath); + if (r == E_SUCCESS) + { + strResult[1] = imageContentInfo.GetMediaFormat(); + strResult[4].Format(FORMAT_BUFFER_SIZE, L"%d x %d", pImgMeta->GetWidth(), + pImgMeta->GetHeight()); + + if (imageContentInfo.GetLocationTag() != EMPTY_SPACE) + { + strResult[5].Format(FORMAT_BUFFER_SIZE, L"%ls", imageContentInfo.GetLocationTag().GetPointer()); + } + + if (pImgMeta->GetLatitude() > 1.0 && pImgMeta->GetLongitude() > 1.0) + { + strResult[6].Format(FORMAT_BUFFER_SIZE, L"%f", pImgMeta->GetLatitude()); + strResult[7].Format(FORMAT_BUFFER_SIZE, L"%f", pImgMeta->GetLongitude()); + } + + strResult[8] = imageContentInfo.GetContentPath(); + } + delete pImgMeta; + } + } + else if (mediaType == IMAGE_VIEWER_MEDIA_TYPE_VIDEO) + { + VideoMetadata* pVideoMeta = ContentManagerUtil::GetVideoMetaN(strFilePath); + if (pVideoMeta != null) + { + VideoContentInfo videoContentInfo; + r = videoContentInfo.Construct(&strFilePath); + if (r == E_SUCCESS) + { + strResult[1] = videoContentInfo.GetMediaFormat(); + strResult[4].Format(FORMAT_BUFFER_SIZE, L"%d x %d", pVideoMeta->GetWidth(), + pVideoMeta->GetHeight()); + if (videoContentInfo.GetLocationTag() != EMPTY_SPACE) + { + strResult[5].Format(FORMAT_BUFFER_SIZE, L"%ls", videoContentInfo.GetLocationTag().GetPointer()); + } + + strResult[8] = videoContentInfo.GetContentPath(); + } + } + } + + for (int i = 0; i < DETAIL_COUNT_MAX; ++i) + { + __pDetail_FileInfo_Value_Label[i]->SetBounds(X_DETAIL_FILEINFO_LABEL, GAP_H_DETAIL_TEXT * (i + 1) + H_DETAIL_MAIN_TEXT + (H_DETAIL_MAIN_TEXT * i) + H_DETAIL_SUB_TEXT * (i + 1), + clientRect.width - GAP_LABEL_END, H_DETAIL_FILEINFO_VALUE_LABEL); + __pDetail_FileInfo_Value_Label[i]->SetText(strResult[i]); + __pDetail_FileInfo_Value_Label[i]->RequestRedraw(); + } + + if (__initializeDisplayModeCurrent == APPCONTROL_MODE_WEB_LINK) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + return r; + } + + if (__pRenameButton == null) + { + __pRenameButton = new (std::nothrow) Button(); + Rectangle rect = GetBounds(); + __pRenameButton->Construct(Rectangle(rect.width - W_RENAME_BUTTON, Y_RENAME_BUTTON, W_RENAME_BUTTON, H_RENAME_BUTTON)); + __pRenameButton->SetActionId(ACTION_ID_PANEL_HEADER_DETAILS_RENAME); + + Bitmap* pIcon = ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_BUTTON_EDIT_NAME); + Bitmap* pIconBackground = + ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_BUTTON_EDIT_NAME_NORMAL_BACKGROUND); + Bitmap* pIconPressed = + ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_BUTTON_EDIT_NAME_NORMAL_BACKGROUND_PRESS); + + if (pIcon != null && pIconPressed != null && pIconBackground != null) + { + __pRenameButton->SetNormalBackgroundBitmap(*pIconBackground); + __pRenameButton->SetPressedBackgroundBitmap(*pIconPressed); + Point iconPosition(0, 0); + __pRenameButton->SetNormalBitmap(iconPosition, *pIcon); + __pRenameButton->SetPressedBitmap(iconPosition, *pIconPressed); + } + else + { + __pRenameButton->SetColor(BUTTON_STATUS_NORMAL, COLOR_HEADER_BUTTON1); + __pRenameButton->SetColor(BUTTON_STATUS_PRESSED, COLOR_HEADER_BUTTON1); + } + delete pIcon; + delete pIconPressed; + delete pIconBackground; + + __pScrollPanel->AddControl(*__pRenameButton); + __pRenameButton->SetColor(BUTTON_STATUS_NORMAL, COLOR_HEADER_BUTTON1); + __pRenameButton->AddActionEventListener(*this); + } + else + { + Rectangle rect = GetBounds(); + __pRenameButton->SetBounds(Rectangle(rect.width - W_RENAME_BUTTON, Y_RENAME_BUTTON, W_RENAME_BUTTON, H_RENAME_BUTTON)); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +ImageViewerForm::ShowPanelDetail(bool showStatus) +{ + AppLogDebug("ENTER"); + if (showStatus) + { + SetDetailInfo(); + __pScrollPanel->SetShowState(true); + __detail = false; + } + else + { + __pScrollPanel->SetShowState(false); + __detail = true; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +ImageViewerForm::ChangeFooterItem(bool isChanged, Footer* pFooter, int position) +{ + AppLogDebug("ENTER"); + FooterItem footerItem; + footerItem.Construct(ACTION_ID_FOOTER_BUTTON_DETAILS); + Bitmap* pfooterItem = null; + + if (isChanged) + { + pfooterItem = ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_BUTTON_DETAILS_CLOSE); + footerItem.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pfooterItem); + } + else + { + pfooterItem = ResourceManager::GetBitmapN(IDB_IMAGE_VIEWERFORM_BUTTON_DETAILS); + footerItem.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pfooterItem); + } + + pFooter->SetItemAt(position, footerItem); + pFooter->Invalidate(true); + + delete pfooterItem; + pfooterItem = null; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +ImageViewerForm::DownloadFile(void) +{ + AppLogDebug("ENTER"); + String DestPath = App::GetInstance()->GetAppRootPath() + TEMP_FILE_PATH_WEB_FILE; + if (File::IsFileExist(DestPath) == false) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + return; + } + + ContentId contentId; + ContentManager contentManager; + contentManager.Construct(); + + ImageContentInfo imageContentInfo; + imageContentInfo.Construct(null); + + imageContentInfo.SetKeyword(L"platform, tizen"); + String sourcePath = DestPath; + String destPath = Environment::GetMediaPath(); + destPath.Append(FOLDER_PATH_DOWNLOADS); + destPath.Append(__downLordFileName); + + contentId = contentManager.CreateContent(sourcePath, destPath, true, &imageContentInfo); + ImageViewerForm::OnFormBackRequested(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +int +ImageViewerForm::GetItemCount(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __pPresentationModel->GetFileCount(); +} + +GalleryItem* +ImageViewerForm::CreateItem(int index) +{ + AppLogDebug("ENTER : index(%d)", index); + GalleryItem* pGallery = new (std::nothrow) GalleryItem(); + + String filePath = __pPresentationModel->GetFilePathAt(index); + ImageInfo* pImageInfo = __pPresentationModel->GetImageCacheAt(index); + Bitmap* pBitmap = pImageInfo->GetBitmapN(); + if (pBitmap == null) + { + pBitmap = GetQuickThumbnailN(filePath); + + if (pBitmap == null) + { + pBitmap = new (std::nothrow) Bitmap(); + pBitmap->Construct(DUMMY_IMAGE_DIMENSION, BITMAP_PIXEL_FORMAT_RGB565); + } + } + pGallery->Construct(*pBitmap, filePath); + delete pBitmap; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pGallery; +} + +bool +ImageViewerForm::DeleteItem(int index, GalleryItem* pItem) +{ + AppLogDebug("ENTER index(%d)", index); + ImageInfo* pImageInfo = __pPresentationModel->GetImageCacheAt(index); + pImageInfo->ClearBitmap(); + delete pItem; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +void +ImageViewerForm::OnGalleryCurrentItemChanged(Gallery& view, int index) +{ + AppLogDebug("ENTER index(%d)", index); + + String filePath = __pPresentationModel->GetFilePathAt(index); + AppLogDebug("ENTER index(%d) filePath(%ls)", index, filePath.GetPointer()); + __pPresentationModel->RequestImage(filePath); + + String strItemText; + String strItemIdxText; + GetHeaderString(__pGallery->GetCurrentItemIndex(), strItemText, strItemIdxText); + __pHeader->SetTitleText(strItemText); + __pHeader->SetDescriptionText(strItemIdxText); + + if (__visible == true) + { + ImageViewerMediaType mediaType = CommonUtil::GetMediaType(filePath); + if (mediaType == IMAGE_VIEWER_MEDIA_TYPE_VIDEO) + { + __pPlayButton->SetShowState(true); + } + else + { + __pPlayButton->SetShowState(false); + } + } + + Invalidate(true); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::OnGalleryItemClicked(Gallery& view, int index) +{ + AppLogDebug("ENTER"); + + String filePath = __pPresentationModel->GetFilePathAt(index); + ContentType contentType = ContentManagerUtil::CheckContentType(filePath); + + if (__visible == true) + { + if (contentType == CONTENT_TYPE_VIDEO) + { + __pPlayButton->SetShowState(false); + } + + SetActionBarsVisible(FORM_ACTION_BAR_INDICATOR | FORM_ACTION_BAR_HEADER | FORM_ACTION_BAR_FOOTER, false); + __visible = false; + } + else + { + if (contentType == CONTENT_TYPE_VIDEO) + { + __pPlayButton->SetShowState(true); + } + + SetActionBarsVisible(FORM_ACTION_BAR_INDICATOR | FORM_ACTION_BAR_HEADER | FORM_ACTION_BAR_FOOTER, true); + __visible = true; + + __pPlayButton->SetPosition(__pPlayButton->GetPosition().x, __pPlayButton->GetPosition().y - 1); + __pPlayButton->SetPosition(__pPlayButton->GetPosition().x, __pPlayButton->GetPosition().y + 1); + } + + Rectangle clientRect = GetClientAreaBounds(); + Rectangle rect = GetBounds(); + __pGallery->SetBounds(Rectangle(0, -clientRect.y, rect.width, rect.height)); + Invalidate(true); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::OnGallerySlideShowStarted(Gallery& gallery) +{ + AppLogDebug("ENTER"); + PowerManager::KeepScreenOnState(true, false); + if (__visible == true) + { + SetActionBarsVisible(FORM_ACTION_BAR_INDICATOR | FORM_ACTION_BAR_HEADER | FORM_ACTION_BAR_FOOTER, false); + + int index = __pGallery->GetCurrentItemIndex(); + String filePath = __pPresentationModel->GetFilePathAt(index); + ContentType contentType = ContentManagerUtil::CheckContentType(filePath); + + if (contentType == CONTENT_TYPE_VIDEO) + { + __pPlayButton->SetShowState(false); + } + + __visible = false; + } + + Rectangle clientRect = GetClientAreaBounds(); + Rectangle rect = GetBounds(); + __pGallery->SetBounds(Rectangle(0, -clientRect.y, rect.width, rect.height)); + Invalidate(true); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::OnGallerySlideShowStopped(Gallery& gallery) +{ + AppLogDebug("ENTER"); + PowerManager::KeepScreenOnState(false, true); + int index = __pGallery->GetCurrentItemIndex(); + + if (__visible == false) + { + SetActionBarsVisible(FORM_ACTION_BAR_INDICATOR | FORM_ACTION_BAR_HEADER | FORM_ACTION_BAR_FOOTER, true); + + String filePath = __pPresentationModel->GetFilePathAt(index); + ContentType contentType = ContentManagerUtil::CheckContentType(filePath); + if (contentType == CONTENT_TYPE_VIDEO) + { + __pPlayButton->SetShowState(true); + } + + __pPlayButton->SetPosition(__pPlayButton->GetPosition().x, __pPlayButton->GetPosition().y - 1); + __pPlayButton->SetPosition(__pPlayButton->GetPosition().x, __pPlayButton->GetPosition().y + 1); + + __visible = true; + } + + String strItemText; + String strItemIdxText; + GetHeaderString(index, strItemText, strItemIdxText); + __pHeader->SetTitleText(strItemText); + __pHeader->SetDescriptionText(strItemIdxText); + + Rectangle clientRect = GetClientAreaBounds(); + Rectangle rect = GetBounds(); + __pGallery->SetBounds(Rectangle(0, -clientRect.y, rect.width, rect.height)); + + Invalidate(true); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::OnUpdateContentList(void) +{ +} + +result +ImageViewerForm::OnTerminating(void) +{ + AppLogDebug("ENTER"); + + if (__pTimer != null) + { + __pTimer->Cancel(); + delete __pTimer; + __pTimer = null; + } + + __pPresentationModel->ClearImageRequests(); + __pPresentationModel->RemoveListener(*this); + + if (__pContextMenuCopy != null) + { + delete __pContextMenuCopy; + __pContextMenuCopy = null; + } + + if (__pContextMenuSetAs != null) + { + delete __pContextMenuSetAs; + __pContextMenuSetAs = null; + } + + if (__pDeletePopup != null) + { + delete __pDeletePopup; + __pDeletePopup = null; + } + + if (__pContextMenuShare != null) + { + delete __pContextMenuShare; + __pContextMenuShare = null; + } + + if (__pContextMenuMore != null) + { + delete __pContextMenuMore; + __pContextMenuMore = null; + } + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +ImageViewerForm::OnActionPerformed(const Control& source, int actionId) +{ + AppLogDebug("ENTER actionId(%d)", actionId); + SceneManager* pSceneManager = SceneManager::GetInstance(); + InitShowGallery(); + + switch (actionId) + { + case ACTION_ID_FOOTER_MORE: + { + InitializeContextMenuMore(); + + __pContextMenuMore->SetShowState(true); + __pContextMenuMore->Show(); + } + break; + case ACTION_ID_CONTEXTMENU_SET_AS: + InitializeContextMenuSetAs(); + + __pContextMenuSetAs->SetShowState(true); + __pContextMenuSetAs->Show(); + break; + case ACTION_ID_FOOTER_BUTTON_SHARE: + InitializeContextMenuShare(); + + __pContextMenuShare->SetShowState(true); + __pContextMenuShare->Show(); + break; + case ACTION_ID_FOOTER_BUTTON_DELETE: + __pDeletePopup->SetShowState(true); + __pDeletePopup->Show(); + break; + case ACTION_ID_FOOTER_BUTTON_SLIDE: + { + if (__pPresentationModel->GetFileCount() > 1) + { + __pGallery->UpdateGallery(); + if (__detail == false) + { + ShowPanelDetail(false); + } + __pGallery->StartSlideShow(true); + } + break; + } + case ACTION_ID_FOOTER_BUTTON_DETAILS: + { + ShowPanelDetail(__detail); + break; + } + case ACTION_ID_FOOTER_BUTTON_BACK: + ImageViewerForm::OnFormBackRequested(*this); + break; + case ACTION_ID_FOOTER_BUTTON_DOWNLOAD: + DownloadFile(); + break; + case ACTION_ID_FOOTER_BUTTON_SAVE: + break; + case ACTION_ID_PANEL_HEADER_DETAILS_RENAME: + { + ArrayList* pSelectedIndex = new (std::nothrow) ArrayList(SingleObjectDeleter); + pSelectedIndex->Construct(); + pSelectedIndex->Add(new (std::nothrow) Integer(__pGallery->GetCurrentItemIndex())); + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_NAME_EDITOR), pSelectedIndex); + break; + } + case ACTION_ID_CONTEXTMENU_HOME: + { + ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter); + pList->Add(new (std::nothrow) Integer(__pGallery->GetCurrentItemIndex())); + pList->Add(new (std::nothrow) Integer(SET_AT_TYPE_HOME_SCREEN_WALLPAPER)); + __pPresentationModel->SetSetterIndex(__pGallery->GetCurrentItemIndex()); + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_SETTER), pList); + break; + } + case ACTION_ID_CONTEXTMENU_LOCK: + { + ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter); + pList->Add(new (std::nothrow) Integer(__pGallery->GetCurrentItemIndex())); + pList->Add(new (std::nothrow) Integer(SET_AT_TYPE_LOCK_SCREEN_WALLPAPER)); + __pPresentationModel->SetSetterIndex(__pGallery->GetCurrentItemIndex()); + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_SETTER), pList); + break; + } + case ACTION_ID_CONTEXTMENU_CALLER: + { + HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); + pDataList->Construct(); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_SELECTION_MODE), + new (std::nothrow) String(APPCONTROL_DATA_SINGLE)); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_RETURN_TYPE), + new (std::nothrow) String(APPCONTROL_DATA_CONTACT_ID)); + + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_CONTACTS, + APPCONTROL_OPERATION_ID_PICK, pDataList, this); + break; + } + case ACTION_ID_CONTEXTMENU_EMAIL: + { + OnRequestEmailAction(); + break; + } + case ACTION_ID_CONTEXTMENU_COPY: + { + int currentIndex = __pGallery->GetCurrentItemIndex(); + String filePath = __pPresentationModel->GetFilePathAt(currentIndex); + + ClipboardItem item; + item.Construct(CLIPBOARD_DATA_TYPE_IMAGE, filePath); + Clipboard* pClipboard = Clipboard::GetInstance(); + pClipboard->CopyItem(item); + break; + } + case ACTION_ID_DELETE_POPUP_DEL: + { + __pDeletePopup->SetShowState(false); + __pDeletePopup->Show(); + DeleteImageFile(); + + if (__detail == false) + { + ShowPanelDetail(false); + } + break; + } + case ACTION_ID_DELETE_POPUP_CANCEL: + { + __pDeletePopup->SetShowState(false); + __pDeletePopup->Show(); + break; + } + case ACTION_ID_CONTORL_BUTTON_PLAY: + CallVideoPlayer(); + break; + default: + break; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::OnFormBackRequested(Form& source) +{ + AppLogDebug("ENTER"); + if (__detail == false) + { + ShowPanelDetail(false); + } + else + { + UiApp* pApp = UiApp::GetInstance(); + pApp->Terminate(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::OnSceneActivatedN(const SceneId& previousSceneId, + const SceneId& currentSceneId, IList* pArgs) +{ + AppLogDebug("ENTER"); + OrientationStatus status = GetOrientationStatus(); + if (status == ORIENTATION_STATUS_PORTRAIT || + status == ORIENTATION_STATUS_PORTRAIT_REVERSE) + { + AppLogDebug("ORIENTATION_STATUS : PORTRAIT"); + Rectangle clientRect = GetClientAreaBounds(); + Rectangle rect = GetBounds(); + __pGallery->SetBounds(Rectangle(0, -clientRect.y, rect.width, rect.height)); + __pPlayButton->SetBounds(RECT_CONTORL_BUTTON_PLAY); + __pScrollPanel->SetBounds(RECT_DETAILS_CONTORL_PANEL); + } + else if (status == ORIENTATION_STATUS_LANDSCAPE || + status == ORIENTATION_STATUS_LANDSCAPE_REVERSE) + { + AppLogDebug("ORIENTATION_STATUS : LANDSCAPE"); + Rectangle clientRect = GetClientAreaBounds(); + Rectangle rect = GetBounds(); + __pGallery->SetBounds(Rectangle(0, -clientRect.y, rect.width, rect.height)); + __pPlayButton->SetBounds(RECT_LANDSCAP_CONTORL_BUTTON_PLAY); + __pScrollPanel->SetBounds(RECT_LANDSCAPE_DETAILS_CONTORL_PANEL); + } + + if (previousSceneId == IDSCN_IMAGE_NAME_EDITOR && currentSceneId == IDSCN_IMAGE_VIEWER) + { + SetDetailInfo(); + String strItemText(EMPTY_SPACE); + String strItemIdxText(EMPTY_SPACE); + GetHeaderString(__pGallery->GetCurrentItemIndex(), strItemText, strItemIdxText); + __pHeader->SetTitleText(strItemText); + __pHeader->SetDescriptionText(strItemIdxText); + Invalidate(true); + } + + if (__pGallery->GetCurrentItemIndex() < 0) + { + SetFooterItemState(false); + } + else + { + SetFooterItemState(true); + } + Invalidate(true); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::OnSceneDeactivated(const SceneId& currentSceneId, + const SceneId& nextSceneId) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::OnImageDecodedN(const int index) +{ + AppLogDebug("ENTER"); + __pGallery->RefreshGallery(index, GALLERY_REFRESH_TYPE_ITEM_MODIFY); + __pGallery->Draw(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::OnAppControlCompleteResponseReceived(const AppId& appId, + const String& operationId, AppCtrlResult appControlResult, + const IMap* pExtraData) +{ + AppLogDebug("ENTER"); + + if (appId == APPCONTROL_PROVIDER_ID_CONTACTS + && operationId == APPCONTROL_OPERATION_ID_PICK + && appControlResult == APP_CTRL_RESULT_SUCCEEDED) + { + const String* pReturnType = + static_cast(pExtraData->GetValue(String(APPCONTROL_KEY_RETURN_TYPE))); + if (pReturnType != null && pReturnType->CompareTo(APPCONTROL_DATA_CONTACT_ID) == 0) + { + const String* pContactId = + static_cast(pExtraData->GetValue(String(APPCONTROL_KEY_VALUE))); + SceneManager* pSceneManager = SceneManager::GetInstance(); + long long lresult = 0; + if (pContactId != null && pContactId->GetLength() > 0) + { + LongLong::Parse(*pContactId, lresult); + } + ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter); + pList->Add(new (std::nothrow) Integer(__pGallery->GetCurrentItemIndex())); + pList->Add(new (std::nothrow) Integer(SET_AT_TYPE_CALLER_IMAGE)); + pList->Add(new (std::nothrow) LongLong(lresult)); + __pPresentationModel->SetSetterIndex(__pGallery->GetCurrentItemIndex()); + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_SETTER), pList); + } + } + + ImageViewerApp* pImageViewerApp = static_cast(ImageViewerApp::GetInstance()); + pImageViewerApp->SetFrameEnabled(true); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::OnOverlayControlCreated(const Control& source) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::OnOverlayControlOpened(const Control& source) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::OnOverlayControlClosed(const Control& source) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::OnOtherControlSelected(const Control& source) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::InitShowGallery(void) +{ + AppLogDebug("ENTER"); + if (__pGallery != null && __pGallery->IsVisible() == false) + { + Canvas* pCanvas = GetCanvasN(); + if (pCanvas == null || GetLastResult() != E_SUCCESS) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + pCanvas->Clear(); + __pGallery->SetShowState(true); + delete pCanvas; + pCanvas = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::OnTimerExpired(Timer &timer) +{ + AppLogDebug("ENTER"); + if (__pPresentationModel->GetFileCount() > 1) + { + __pGallery->StartSlideShow(true); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::OnContentTransferInProgress(RequestId requestId, int totalReceivedSize) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::OnContentUploadCompleted(RequestId requestId, result transferResult, const String& errorCode, + const String& errorMessage) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::OnContentDownloadCompleted(RequestId requestId, ContentId contentId, + result transferResult, const String& errorCode, const String& errorMessage) +{ + AppLogDebug("ENTER"); + AppLogTag("IV", "ImageViewerForm::OnContentDownloadCompleted"); + AppLogTag("IV", "DownloadCompleted Error [%s]", GetErrorMessage(transferResult)); + AppLogTag("IV", "errorCode [%ls] errorMessage [%ls]", errorCode.GetPointer(), errorMessage.GetPointer()); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::OnContentDownloadToBufferCompleted(RequestId reqId, ByteBuffer* pBuffer, result r, + const String& errorCode, const String& errorMessage) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::OnContentTransferCanceled(RequestId reqId, result res, const String& errorCode, + const String& errorMessage) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::RequestDecodeUrl(void) +{ + AppLogDebug("ENTER"); + + String filePath = __pPresentationModel->GetFilePathAt(0); + + if (filePath.StartsWith(WEB_URL_HTTP, 0) == false) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + __downLordFileName = __pPresentationModel->GetFileName(filePath); + + Image* pImage = new (std::nothrow) Image(); + pImage->Construct(); + Uri uri; + RequestId reqId; + uri.SetUri(filePath); + + pImage->DecodeUrl(uri, BITMAP_PIXEL_FORMAT_RGB565, 720, 1280, reqId, *this, 5000); + + delete pImage; + pImage = null; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::OnImageDecodeUrlReceived (RequestId reqId, Bitmap *pBitmap, + result r, const String errorCode, const String errorMessage) +{ + AppLogDebug("ENTER"); + Image* pImage = new (std::nothrow) Image(); + pImage->Construct(); + + String destPath = App::GetInstance()->GetAppRootPath() + TEMP_FILE_PATH_WEB_FILE; + r = pImage->EncodeToFile(*pBitmap, IMG_FORMAT_JPG, destPath, true); + + if (r == E_SUCCESS) + { + __pPresentationModel->GetImageCacheAt(0)->SetFilePath(destPath); + __pPresentationModel->GetImageCacheAt(0)->SetBitmap(pBitmap); + + __pGallery->RefreshGallery(0, GALLERY_REFRESH_TYPE_ITEM_MODIFY); + __pGallery->Draw(); + __pPresentationModel->RequestImage(destPath); + } + else + { + AppLogDebug("ImageViewerForm::OnImageDecodeUrlReceived [%s]", GetErrorMessage(r)); + } + + delete pImage; + pImage = null; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::OnRequestEmailAction(void) +{ + AppLogDebug("ENTER"); + int currentIndex = __pGallery->GetCurrentItemIndex(); + + if (__pPresentationModel->GetFileCount() <= 0) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + String combineText = EMPTY_SPACE; + + String filePath = __pPresentationModel->GetFilePathAt(currentIndex); + + if (filePath.EndsWith(CONTENT_EXT_PNG) + || filePath.EndsWith(CONTENT_EXT_BMP) + || filePath.EndsWith(CONTENT_EXT_JPG) + || filePath.EndsWith(CONTENT_EXT_GIF) + || filePath.EndsWith(CONTENT_EXT_TIF) + || filePath.EndsWith(CONTENT_EXT_MP4) + || filePath.EndsWith(CONTENT_EXT_3GP) + || filePath.EndsWith(CONTENT_EXT_AVI) + || filePath.EndsWith(CONTENT_EXT_RM) + || filePath.EndsWith(CONTENT_EXT_WMV) + || filePath.EndsWith(CONTENT_EXT_ASF)) + { + if (combineText.CompareTo(EMPTY_SPACE) != 0) + { + combineText.Append(L";"); + } + + combineText.Append(filePath); + } + + HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); + pDataList->Construct(); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), + new (std::nothrow) String(combineText)); + + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, + APPCONTROL_OPERATION_ID_COMPOSE, pDataList, this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerForm::SetFooterItemState(bool isEnable) +{ + AppLogDebug("ENTER"); + if (__initializeDisplayModeCurrent == APPCONTROL_MODE_NORMAL) + { + __pFooter->SetButtonEnabled(BUTTON_POSITION_LEFT, isEnable); + __pFooter->SetItemEnabled(0, isEnable); + __pFooter->SetItemEnabled(1, isEnable); + } + else if (__initializeDisplayModeCurrent == APPCONTROL_MODE_WEB_LINK) + { + __pFooter->SetButtonEnabled(BUTTON_POSITION_LEFT, isEnable); + __pFooter->SetItemEnabled(0, isEnable); + __pFooter->SetItemEnabled(1, isEnable); + } + else if (__initializeDisplayModeCurrent == APPCONTROL_MODE_CROP) + { + __pFooter->SetItemEnabled(0, isEnable); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +Bitmap* +ImageViewerForm::GetQuickThumbnailN(String& filePath) +{ + AppLogDebug("ENTER"); + Bitmap* pBitmap = null; + + if (filePath.GetLength() > 4) + { + int totalPage = 0; + int totalCount = 0; + ContentSearch contentSearch; + ContentSearchResult* pResultItem = null; + IList* pContentInfoList = null; + String queryString; + ContentType contentType = ContentManagerUtil::CheckContentType(filePath); + result r = contentSearch.Construct(contentType); + AppLogDebug("r(%s)", GetErrorMessage(r)); + if (r != E_SUCCESS) + { + pBitmap = new (std::nothrow) Bitmap(); + r = pBitmap->Construct(DUMMY_IMAGE_DIMENSION, BITMAP_PIXEL_FORMAT_RGB565); + if (r == E_SUCCESS) + { + return pBitmap; + } + else + { + delete pBitmap; + return null; + } + } + queryString = CONTENT_QUERY_PREFIX_FILENAME; + queryString.Append(L"'"); + queryString.Append(__pPresentationModel->GetFileName(filePath)); + queryString.Append(L"'"); + + pContentInfoList = contentSearch.SearchN(PAGE_NO_CONTENT_SEARCH, COUNT_PER_PAGE_CONTENT_SEARCH, + totalPage, totalCount, queryString, EMPTY_SPACE, SORT_ORDER_NONE); + + if ((pContentInfoList != null) && GetLastResult() == E_SUCCESS && (pContentInfoList->GetCount() > 0)) + { + IEnumerator* pEnum = pContentInfoList->GetEnumeratorN(); + while (pEnum->MoveNext() == E_SUCCESS) + { + pResultItem = static_cast(pEnum->GetCurrent()); + if (pResultItem == null) + { + continue; + } + + if (pResultItem->GetContentInfo()->GetContentPath().CompareTo(filePath) == 0) + { + pBitmap = pResultItem->GetContentInfo()->GetThumbnailN(); + } + } + delete pEnum; + } + + if (pContentInfoList != null) + { + delete pContentInfoList; + } + + if (pBitmap != null) + { + ImageViewerMediaType mediaType = CommonUtil::GetMediaType(filePath); + if (mediaType == IMAGE_VIEWER_MEDIA_TYPE_IMAGE) + { + ImageMetadata* pImgMeta = ContentManagerUtil::GetImageMetaN(filePath); + + if (pImgMeta != null) + { + Dimension srcDim(pImgMeta->GetWidth(), pImgMeta->GetHeight()); + pBitmap->Scale(srcDim); + delete pImgMeta; + } + else + { + ImageBuffer* imageBuffer = new (std::nothrow) ImageBuffer(); + result r = imageBuffer->Construct(filePath); + if (r == E_SUCCESS) + { + Dimension srcDim(imageBuffer->GetWidth(), imageBuffer->GetHeight()); + pBitmap->Scale(srcDim); + delete imageBuffer; + } + } + } + else if (mediaType == IMAGE_VIEWER_MEDIA_TYPE_VIDEO) + { + VideoMetadata* pVideoMeta = ContentManagerUtil::GetVideoMetaN(filePath); + + if (pVideoMeta != null && GetLastResult() == E_SUCCESS) + { + Dimension srcDim(pVideoMeta->GetWidth(), pVideoMeta->GetHeight()); + pBitmap->Scale(srcDim); + delete pVideoMeta; + } + } + } + else + { + Canvas mainCanvas; + mainCanvas.Construct(DUMMY_IMAGE_RECTANGLE); + mainCanvas.FillRectangle(Color::GetColor(COLOR_ID_WHITE), DUMMY_IMAGE_RECTANGLE); + pBitmap = new (std::nothrow) Bitmap(); + pBitmap->Construct(mainCanvas, DUMMY_IMAGE_RECTANGLE); + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + return pBitmap; +} diff --git a/src/IvImageViewerPresentationModel.cpp b/src/IvImageViewerPresentationModel.cpp new file mode 100644 index 0000000..066ba0d --- /dev/null +++ b/src/IvImageViewerPresentationModel.cpp @@ -0,0 +1,543 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvImageViewerPresentationModel.cpp + * @brief This is the implementation file for ImageViewerPresentationModel class. + */ + +#include +#include +#include +#include +#include +#include "IvImageEvent.h" +#include "IvImageEventArg.h" +#include "IvImageInfo.h" +#include "IvImageProvider.h" +#include "IvImageViewerApp.h" +#include "IvImageViewerEventListener.h" +#include "IvImageViewerPresentationModel.h" +#include "IvSettingPresentationModel.h" +#include "IvTypes.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::Content; +using namespace Tizen::Io; +using namespace Tizen::Media; + +static const int PAGE_NO_CONTENT_SEARCH = 1; +static const int COUNT_PER_PAGE_CONTENT_SEARCH = 10; + +ImageViewerPresentationModel* ImageViewerPresentationModel::__pPresentationModelInstance = null; +ImageProvider* ImageViewerPresentationModel::__pImageProvider = null; +ImageEvent* ImageViewerPresentationModel::__pImageEvent = null; +Tizen::Base::Collection::ArrayList* ImageViewerPresentationModel::__pImageViewerListener = null; + +ImageViewerPresentationModel::ImageViewerPresentationModel(void) + : __pImageCaches(null) + , __contactId(0) + , __startIndex(0) + , __setterIndex(0) + , __durationOfSlideShow(0) + , __transitionEffectOfSlideShow(SLIDE_SHOW_TRANSITION_EFFECT_SLIDE) + , __pSettingPresentationModel(null) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +ImageViewerPresentationModel::~ImageViewerPresentationModel(void) +{ + AppLogDebug("ENTER"); + delete __pImageCaches; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +ImageViewerPresentationModel* +ImageViewerPresentationModel::GetInstance() +{ + AppLogDebug("ENTER"); + if (__pPresentationModelInstance == null) + { + CreateInstance(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __pPresentationModelInstance; +} + +result +ImageViewerPresentationModel::Construct(void) +{ + AppLogDebug("ENTER"); + if (__pImageCaches != null) + { + delete __pImageCaches; + } + __pImageCaches = new (std::nothrow) ArrayList(SingleObjectDeleter); + __pImageCaches->Construct(); + + ImageViewerApp* pImageViewerApp = static_cast(ImageViewerApp::GetInstance()); + String uriData = pImageViewerApp->GetUriData(); + if (uriData.IsEmpty() == true) + { + const IMap* pArguments = pImageViewerApp->GetAppControlArguments(); + + if (pArguments != null) + { + const String* pType = static_cast(pArguments->GetValue(String(APPCONTROL_KEY_TYPE))); + const String* pPath = static_cast(pArguments->GetValue(String(APPCONTROL_KEY_PATH))); + const String* pIndex = static_cast(pArguments->GetValue(String(APPCONTROL_KEY_INDEX))); + + if (pIndex != null) + { + Integer::Parse(*pIndex, __startIndex); + if (__startIndex < 0) + { + __startIndex = 0; + } + } + if (pType != null) + { + __type = *pType; + } + if (pPath != null) + { + String delim(APPCONTROL_PATH_SEPARATOR); + String currentPath = *pPath; + ImageInfo* pImageInfo = null; + String tempPath; + + wchar_t tempChar[2] = L""; + + result r = E_SUCCESS; + FileAttributes attr; + + int loopCount = currentPath.GetLength(); + for (int i = 0; i < loopCount; ++i) + { + currentPath.GetCharAt(i, *tempChar); + if (delim != tempChar) + { + tempPath += tempChar; + } + else + { + r = File::GetAttributes(tempPath, attr); + if (r == E_SUCCESS && attr.IsDirectory() != true) + { + pImageInfo = new (std::nothrow) ImageInfo(); + pImageInfo->Construct(tempPath, null); + __pImageCaches->Add(pImageInfo); + tempPath.Clear(); + continue; + } + tempPath += L";"; + } + } + + r = File::GetAttributes(tempPath, attr); + if (r == E_SUCCESS && attr.IsDirectory() != true) + { + pImageInfo = new (std::nothrow) ImageInfo(); + pImageInfo->Construct(tempPath, null); + __pImageCaches->Add(pImageInfo); + } + } + } + } + else + { + __startIndex = 0; + uriData.Replace(APPCONTROL_DATA_URI_FILE, L""); + ImageInfo* pImageInfo = new (std::nothrow) ImageInfo(); + pImageInfo->Construct(uriData, null); + __pImageCaches->Add(pImageInfo); + } + + __pSettingPresentationModel = SettingPresentationModel::GetInstance(); + LoadSettingValue(); + + __pImageViewerListener = new (std::nothrow) ArrayList(); + __pImageViewerListener->Construct(); + + IImageProviderEventListener* pImageProviderEventListener = static_cast(this); + __pImageEvent = new (std::nothrow) ImageEvent(); + __pImageEvent->AddListener(*pImageProviderEventListener, true); + + __pImageProvider = ImageProvider::GetInstance(); + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +ImageViewerPresentationModel::CreateInstance(void) +{ + __pPresentationModelInstance = new (std::nothrow) ImageViewerPresentationModel(); + result r = __pPresentationModelInstance->Construct(); + if (IsFailed(r) == true) + { + delete __pPresentationModelInstance; + __pPresentationModelInstance = null; + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + std::atexit(DestroyInstance); +} + +void +ImageViewerPresentationModel::DestroyInstance(void) +{ + AppLogDebug("ENTER"); + delete __pImageEvent; + delete __pImageViewerListener; + delete __pPresentationModelInstance; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +ImageViewerPresentationModel::AddListener(IImageViewerEventListener* listener) +{ + AppLogDebug("ENTER"); + result r = __pImageViewerListener->Add(listener); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +ImageViewerPresentationModel::RemoveListener(IImageViewerEventListener& listner) +{ + AppLogDebug("ENTER"); + result r = __pImageViewerListener->Remove(listner); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +int +ImageViewerPresentationModel::GetStartIndex(void) const +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __startIndex; +} + +void +ImageViewerPresentationModel::ClearImageRequests(bool appTerminating) +{ + __pImageProvider->ClearImageRequests(appTerminating); +} + +void +ImageViewerPresentationModel::DeleteFilePathAt(const int index) +{ + AppLogDebug("ENTER"); + __pImageCaches->RemoveAt(index, true); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageViewerPresentationModel::UpdateFilePathAt(const int index, const String& filePath) +{ + AppLogDebug("ENTER index(%d) filePath(%ls)", index, filePath.GetPointer()); + ImageInfo* pImageInfo = static_cast(__pImageCaches->GetAt(index)); + pImageInfo->SetFilePath(filePath); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +String +ImageViewerPresentationModel::GetFilePathAt(const int index) const +{ + AppLogDebug("ENTER index(%d)", index); + if (index < 0 || __pImageCaches->GetCount() <= index) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return EMPTY_SPACE; + } + + ImageInfo* pImageInfo = static_cast(__pImageCaches->GetAt(index)); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pImageInfo->GetFilePath(); +} + +ArrayList* +ImageViewerPresentationModel::GetImageCache() const +{ + return __pImageCaches; +} + +ImageInfo* +ImageViewerPresentationModel::GetImageCacheAt(const int index) const +{ + return static_cast(__pImageCaches->GetAt(index)); +} + +int +ImageViewerPresentationModel::GetFileCount(void) const +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __pImageCaches->GetCount(); +} + +String +ImageViewerPresentationModel::GetType(void) const +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __type; +} + +String +ImageViewerPresentationModel::GetFileName(const String& filePath, bool checkExe) const +{ + AppLogDebug("ENTER"); + String strResult; + int lastIndex = -1 ; + + filePath.LastIndexOf(DIRECTORY_SEPARATOR, filePath.GetLength() - 1, lastIndex); + filePath.SubString(lastIndex+1, strResult); + + if (checkExe == true) + { + String strTemp = strResult; + lastIndex = -1; + strTemp.LastIndexOf(FILE_EXT_SEPARATOR, strTemp.GetLength() - 1, lastIndex); + strTemp.SubString(0, lastIndex, strResult); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return strResult; +} + +result +ImageViewerPresentationModel::StartAppControl(const String& providerId, const String & operationId, + const HashMap* pDataList, IAppControlResponseListener* pListener) +{ + AppLogDebug("ENTER"); + result r = E_FAILURE; + + if (pDataList != null) + { + IList* pKeyList = pDataList->GetKeysN(); + if (pKeyList != null) + { + int keyCount = pKeyList->GetCount(); + for (int i = 0 ; i < keyCount ; ++i) + { + String* pKey = const_cast(static_cast(pKeyList->GetAt(i))); + String* pValue = const_cast(static_cast(pDataList->GetValue(*pKey))); + + AppLogDebug("(%ls:%ls)", pKey == null ? L"(null)" : pKey->GetPointer(), pValue == null ? L"(null)" : pValue->GetPointer()); + } + } + } + + AppControl* pAc = AppManager::FindAppControlN(providerId, operationId); + + if (pAc == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + return E_FAILURE; + } + + r = pAc->Start(null, null, pDataList, pListener); + + if (r == E_SUCCESS) + { + ImageViewerApp* pImageViewerApp = static_cast(ImageViewerApp::GetInstance()); + pImageViewerApp->SetFrameEnabled(false); + } + + delete pAc; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +void +ImageViewerPresentationModel::RequestImage(const Tizen::Base::String& filePath) const +{ + AppLogDebug("ENTER"); + __pImageProvider->RequestImage(filePath, __pImageEvent); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +ContentId +ImageViewerPresentationModel::GetFileContentId(const String& filePath) const +{ + AppLogDebug("ENTER"); + ContentId contentId; + int totalPage = 0; + int totalCount = 0; + ContentSearch contentSearch; + ContentSearchResult* pResultItem = null; + IList* pContentInfoList = null; + String queryString; + + contentSearch.Construct(CONTENT_TYPE_ALL); + + queryString = CONTENT_QUERY_PREFIX_FILENAME; + queryString.Append(L"'"); + queryString.Append(GetFileName(filePath)); + queryString.Append(L"'"); + + pContentInfoList = contentSearch.SearchN(PAGE_NO_CONTENT_SEARCH, COUNT_PER_PAGE_CONTENT_SEARCH, totalPage, + totalCount, queryString, EMPTY_SPACE, SORT_ORDER_NONE); + + if ((pContentInfoList != null) && (pContentInfoList->GetCount() > 0)) + { + IEnumerator* pEnum = pContentInfoList->GetEnumeratorN(); + while (pEnum->MoveNext() == E_SUCCESS) + { + pResultItem = static_cast(pEnum->GetCurrent()); + if (pResultItem == null) + { + continue; + } + + if (pResultItem->GetContentInfo()->GetContentPath().CompareTo(filePath) == 0) + { + contentId = pResultItem->GetContentInfo()->GetContentId(); + } + } + delete pEnum; + pEnum = null; + } + + if (pContentInfoList != null) + { + delete pContentInfoList; + pContentInfoList = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return contentId; +} + +int +ImageViewerPresentationModel::GetSetterIndex(void) const +{ + return __setterIndex; +} + +void +ImageViewerPresentationModel::SetSetterIndex(const int index) +{ + __setterIndex = index; +} + +int +ImageViewerPresentationModel::GetDurationOfSlideShow(void) const +{ + return __durationOfSlideShow; +} + +SlideShowTransitionEffect +ImageViewerPresentationModel::GetTransitionEffectOfSlideShow(void) const +{ + return __transitionEffectOfSlideShow; +} + +void +ImageViewerPresentationModel::OnImageReceivedN(IEventArg& eventArg) +{ + AppLogDebug("ENTER"); + ImageEventArg* pImageEventArg = static_cast(&eventArg); + if (pImageEventArg != null) + { + ImageInfo* pImageInfo = null; + String string; + String stringDecoded = pImageEventArg->GetFilePath(); + int loopCount = __pImageCaches->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + pImageInfo = static_cast(__pImageCaches->GetAt(i)); + string = pImageInfo->GetFilePath(); + + if (string.CompareTo(stringDecoded) == 0) + { + ArrayList* pCaches = ImageViewerPresentationModel::GetInstance()->GetImageCache(); + Bitmap* pBitmap = pImageEventArg->GetBitmapN(); + + if (pBitmap != null) + { + ImageInfo* pImageInfo = static_cast(pCaches->GetAt(i)); + + pImageInfo->SetBitmap(pBitmap); + + IImageViewerEventListener* pEventListener = null; + IEnumerator* pEventEnum = __pImageViewerListener->GetEnumeratorN(); + while (pEventEnum->MoveNext() == E_SUCCESS) + { + pEventListener = static_cast(pEventEnum->GetCurrent()); + pEventListener->OnImageDecodedN(i); + } + delete pEventEnum; + } + break; + } + } + } + AppLogDebug("Exit"); +} + +void +ImageViewerPresentationModel::LoadSettingValue() +{ + int returnValue = 0; + + __pSettingPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER, + ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_INTERVAL, returnValue); + __durationOfSlideShow = (returnValue * 1000); + + __pSettingPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER, + ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_TRANSITION_EFFECT, returnValue); + switch (returnValue) + { + case 0: + __transitionEffectOfSlideShow = SLIDE_SHOW_TRANSITION_EFFECT_SLIDE; + break; + case 1: + __transitionEffectOfSlideShow = SLIDE_SHOW_TRANSITION_EFFECT_PAGE; + break; + case 2: + __transitionEffectOfSlideShow = SLIDE_SHOW_TRANSITION_EFFECT_DISSOLVE; + break; + case 3: + __transitionEffectOfSlideShow = SLIDE_SHOW_TRANSITION_EFFECT_ZOOM; + break; + default: + break; + } +} diff --git a/src/IvMainFrame.cpp b/src/IvMainFrame.cpp new file mode 100644 index 0000000..9589071 --- /dev/null +++ b/src/IvMainFrame.cpp @@ -0,0 +1,83 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvMainFrame.cpp + * @brief This is the implementation file for MainFrame class. + */ + +#include "IvFormFactory.h" +#include "IvImageViewerApp.h" +#include "IvMainFrame.h" +#include "IvTypes.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; + +MainFrame::MainFrame(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +MainFrame::~MainFrame(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +MainFrame::OnInitializing(void) +{ + AppLogDebug("ENTER"); + static const wchar_t* PANEL_BLANK = L""; + static FormFactory formFactory; + + SceneManager* pSceneManager = SceneManager::GetInstance(); + pSceneManager->RegisterFormFactory(formFactory); + + pSceneManager->RegisterScene(IDSCN_IMAGE_VIEWER, FORM_IMAGE_VIEWER, PANEL_BLANK); + pSceneManager->RegisterScene(IDSCN_IMAGE_SETTER, FORM_IMAGE_SETTER, PANEL_BLANK); + pSceneManager->RegisterScene(IDSCN_IMAGE_NAME_EDITOR, FORM_IMAGE_NAME_EDITOR, PANEL_BLANK); + + ImageViewerApp* pImageViewerApp = static_cast(ImageViewerApp::GetInstance()); + + String operationID = pImageViewerApp->GetAppControlOperationId(); + if (operationID.CompareTo(APPCONTROL_OPERATION_ID_VIEW) == 0) + { + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_VIEWER), null); + } + else + { + pImageViewerApp->Terminate(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +MainFrame::OnTerminating(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} diff --git a/src/IvResourceManager.cpp b/src/IvResourceManager.cpp new file mode 100644 index 0000000..3895586 --- /dev/null +++ b/src/IvResourceManager.cpp @@ -0,0 +1,61 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvResourceManager.cpp + * @brief This is the implementation file for ResourceManager class. + */ + +#include +#include "IvResourceManager.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +Bitmap* +ResourceManager::GetBitmapN(const String& id) +{ + AppLogDebug("ENTER"); + AppResource* pAppResource = Application::GetInstance()->GetAppResource(); + if (pAppResource == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + return null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pAppResource->GetBitmapN(id); +} + +String +ResourceManager::GetString(const String& id) +{ + AppLogDebug("ENTER"); + AppResource* pAppResource = Application::GetInstance()->GetAppResource(); + if (pAppResource == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return null; + } + + String str; + pAppResource->GetString(id, str); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return str; +} diff --git a/src/IvSettingPresentationModel.cpp b/src/IvSettingPresentationModel.cpp new file mode 100644 index 0000000..1e0af65 --- /dev/null +++ b/src/IvSettingPresentationModel.cpp @@ -0,0 +1,199 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvSettingPresentationModel.cpp + * @brief This is the implementation file for SettingPresentationModel class. + */ + +#include +#include "IvSettingPresentationModel.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Io; +using namespace std; + +const wchar_t* GALLERY_APP_ID = L"ijudt7w61q.Gallery"; +const wchar_t* PATH_DATA_DIRECTORY = L"data/"; +const wchar_t* PATH_GALLERY_DEFAULT_SETTINGS = L"GalleryDefaultSettings.ini"; +const wchar_t* PATH_GALLERY_SETTINGS = L"GalleryUserSettings.ini"; + +const wchar_t* SECTION_GALLERY = L"GALLRY_SETTING"; +const wchar_t* SECTION_IMAGE_VIEWER = L"IMAGE_VIEWER_SETTING"; +const wchar_t* SECTION_VIDEO_PLAYER = L"VIDEO_PLAYER_SETTING"; + +const wchar_t* SLIDESHOW_INTERVAL_VALUE = L"SLIDESHOW_INTERVAL_VALUE"; +const wchar_t* TRANSITION_EFFECT_VALUE = L"TRANSITION_EFFECT_VALUE"; + +SettingPresentationModel* SettingPresentationModel::__pPresentationModelInstance = null; + +SettingPresentationModel::SettingPresentationModel(void) + : __pDefaultGalleryRegistry(null) + , __pAppGalleryRegistry(null) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +SettingPresentationModel::~SettingPresentationModel(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +SettingPresentationModel* +SettingPresentationModel::GetInstance(void) +{ + AppLogDebug("ENTER"); + if (__pPresentationModelInstance == null) + { + CreateInstance(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __pPresentationModelInstance; +} + +result +SettingPresentationModel::Construct(void) +{ + AppLogDebug("ENTER"); + + String valueRegistryString = L""; + AppManager* pAppManager = AppManager::GetInstance(); + TryReturn(pAppManager != null, E_FAILURE, "Failed to get AppManager"); + String pathGallerySetting = + pAppManager->GetAppSharedPath(GALLERY_APP_ID) + PATH_DATA_DIRECTORY + PATH_GALLERY_SETTINGS; + if (GetLastResult() == E_APP_NOT_INSTALLED) + { + AppLogDebug("GETSHAREPATH(The expected shared directory cannot be found because the application specified " + "with appId cannot be installed.)"); + } + else + { + AppLogDebug("GETSHAREPATH(%ls)",pathGallerySetting.GetPointer()); + } + result r = CreateDefaultRegistry(); + TryCatch(r == E_SUCCESS, , "CreateDefaultRegistry() failed[%s]", GetErrorMessage(r)); + + if (File::IsFileExist(pathGallerySetting)) + { + AppLogDebug("Already exist camcorder settings file"); + __pAppGalleryRegistry = new (nothrow) Registry(); + __pAppGalleryRegistry->Construct(pathGallerySetting, "r"); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; + +CATCH: + delete __pDefaultGalleryRegistry; + __pDefaultGalleryRegistry = null; + + delete __pAppGalleryRegistry; + __pAppGalleryRegistry = null; + AppLogDebug("EXIT with exception(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +void +SettingPresentationModel::CreateInstance(void) +{ + AppLogDebug("ENTER"); + __pPresentationModelInstance = new (nothrow) SettingPresentationModel; + result r = __pPresentationModelInstance->Construct(); + + if (IsFailed(r) == true) + { + delete __pPresentationModelInstance; + __pPresentationModelInstance = null; + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + atexit(DestroyInstance); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingPresentationModel::DestroyInstance(void) +{ + AppLogDebug("ENTER"); + delete __pPresentationModelInstance; + __pPresentationModelInstance = null; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +SettingPresentationModel::GetValue(const String& strSectionName, const String& entryName, int& value) const +{ + AppLogDebug("ENTER"); + result r = E_SUCCESS; + if (__pAppGalleryRegistry != null) + { + r = __pAppGalleryRegistry->GetValue(strSectionName, entryName, value); + } + else if(__pDefaultGalleryRegistry != null) + { + r = __pDefaultGalleryRegistry->GetValue(strSectionName, entryName, value); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +SettingPresentationModel::GetValue(const String& strSectionName, const String& entryName, String& value) const +{ + AppLogDebug("ENTER"); + result r = E_SUCCESS; + if (__pAppGalleryRegistry != null) + { + r = __pAppGalleryRegistry->GetValue(strSectionName, entryName, value); + } + else if(__pDefaultGalleryRegistry != null) + { + r = __pDefaultGalleryRegistry->GetValue(strSectionName, entryName, value); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +SettingPresentationModel::CreateDefaultRegistry(void) +{ + AppLogDebug("ENTER"); + result r = E_SUCCESS; + AppManager* pAppManager = AppManager::GetInstance(); + TryReturn(pAppManager != null, E_FAILURE, "Failed to get AppManager"); + String pathGalleryDefaultSetting = + pAppManager->GetAppSharedPath(GALLERY_APP_ID) + PATH_DATA_DIRECTORY + PATH_GALLERY_DEFAULT_SETTINGS; + + if (File::IsFileExist(pathGalleryDefaultSetting)) + { + AppLogDebug("Already exist default settings file"); + __pDefaultGalleryRegistry = new (nothrow) Registry(); + __pDefaultGalleryRegistry->Construct(pathGalleryDefaultSetting, "r"); + } + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} diff --git a/src/IvTypes.cpp b/src/IvTypes.cpp new file mode 100644 index 0000000..7781d0e --- /dev/null +++ b/src/IvTypes.cpp @@ -0,0 +1,121 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://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 IvTypes.cpp + * @brief This is the implementation file for Types definition + */ + +#include +#include +#include "IvTypes.h" + +const wchar_t* FORM_IMAGE_VIEWER = L"ImageViewerForm"; +const wchar_t* FORM_IMAGE_SETTER = L"ImageSetterForm"; +const wchar_t* FORM_IMAGE_NAME_EDITOR = L"ImageNameEditorForm"; + +const wchar_t* IDSCN_IMAGE_VIEWER = L"SceneImageView"; +const wchar_t* IDSCN_IMAGE_SETTER = L"SceneImageSetterForm"; +const wchar_t* IDSCN_IMAGE_NAME_EDITOR = L"SceneImageNameEditorForm"; + +const wchar_t* APPCONTROL_PROVIDER_ID_MESSAGE = L"tizen.messages"; +const wchar_t* APPCONTROL_PROVIDER_ID_EMAIL = L"tizen.email"; +const wchar_t* APPCONTROL_PROVIDER_ID_CONTACTS = L"tizen.contacts"; +const wchar_t* APPCONTROL_PROVIDER_ID_VIDEO_PLAYER = L"tizen.videoplayer"; + +const wchar_t* APPCONTROL_OPERATION_ID_PICK = L"http://tizen.org/appcontrol/operation/pick"; +const wchar_t* APPCONTROL_OPERATION_ID_VIEW = L"http://tizen.org/appcontrol/operation/view"; +const wchar_t* APPCONTROL_OPERATION_ID_PLAY = L"http://tizen.org/appcontrol/operation/play"; +const wchar_t* APPCONTROL_OPERATION_ID_COMPOSE = L"http://tizen.org/appcontrol/operation/compose"; +const wchar_t* APPCONTROL_OPERATION_ID_CONFIGURE = L"http://tizen.org/appcontrol/operation/configure"; +const wchar_t* APPCONTROL_OPERATION_ID_MAIN = L"http://tizen.org/appcontrol/operation/main"; + +const wchar_t* APPCONTROL_KEY_TYPE = L"type"; +const wchar_t* APPCONTROL_KEY_PATH = L"path"; +const wchar_t* APPCONTROL_KEY_INDEX = L"index"; +const wchar_t* APPCONTROL_KEY_ATTACHMENTS = L"attachments"; +const wchar_t* APPCONTROL_KEY_SELECTION_MODE = L"selectionMode"; +const wchar_t* APPCONTROL_KEY_VALUE = L"value"; +const wchar_t* APPCONTROL_KEY_RETURN_TYPE = L"returnType"; +const wchar_t* APPCONTROL_KEY_LEGACY_RESULT = L"http://tizen.org/appcontrol/data/legacyresult"; + +const wchar_t* APPCONTROL_DATA_IMAGE = L"image"; +const wchar_t* APPCONTROL_DATA_VIDEO = L"video"; +const wchar_t* APPCONTROL_DATA_SLIDE_SHOW = L"slideshow"; +const wchar_t* APPCONTROL_DATA_EMAIL = L"email"; +const wchar_t* APPCONTROL_DATA_SINGLE = L"single"; +const wchar_t* APPCONTROL_DATA_CONTACT_ID = L"contactId"; +const wchar_t* APPCONTROL_DATA_URI_FILE = L"file://"; + +const wchar_t* SETTING_VALUE_HOME_SCREEN_WALLPAPER = L"http://tizen.org/setting/screen.wallpaper"; +const wchar_t* SETTING_VALUE_LOCK_SCREEN_WALLPAPER = L"http://tizen.org/setting/screen.wallpaper.lock"; + +const wchar_t* FOLDER_PATH_DOWNLOADS = L"Downloads/"; + +const wchar_t* TEMP_FILE_PATH_HOME_SCREEN_WALLPAPER = L"shared/data/home.jpg"; +const wchar_t* TEMP_FILE_PATH_LOCK_SCREEN_WALLPAPER = L"shared/data/lock.jpg"; +const wchar_t* TEMP_FILE_PATH_WEB_FILE = L"data/test_out.jpg"; + +const wchar_t* WEB_URL_HTTP = L"http://"; + +const wchar_t* CONTENT_EXT_JPG = L"jpg"; +const wchar_t* CONTENT_EXT_PNG = L"png"; +const wchar_t* CONTENT_EXT_BMP = L"bmp"; +const wchar_t* CONTENT_EXT_GIF = L"gif"; +const wchar_t* CONTENT_EXT_TIF = L"tif"; +const wchar_t* CONTENT_EXT_TIFF = L"tiff"; +const wchar_t* CONTENT_EXT_WBMP = L"wbmp"; +const wchar_t* CONTENT_EXT_JPEG = L"jpeg"; +const wchar_t* CONTENT_EXT_MP4 = L"mp4"; +const wchar_t* CONTENT_EXT_3GP = L"3gp"; +const wchar_t* CONTENT_EXT_AVI = L"avi"; +const wchar_t* CONTENT_EXT_ASF = L"asf"; +const wchar_t* CONTENT_EXT_WMV = L"wmv"; +const wchar_t* CONTENT_EXT_RM = L".rm"; +const wchar_t* CONTENT_EXT_FLV = L".flv"; + +const wchar_t* CONTENT_QUERY_PREFIX_FILENAME = L"ContentFileName ="; + +const wchar_t* EMPTY_SPACE = L""; +const wchar_t* DIRECTORY_SEPARATOR = L"/"; +const wchar_t* FILE_EXT_SEPARATOR = L"."; +const wchar_t* APPCONTROL_PATH_SEPARATOR = L";"; + +const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_PLAY = L"T0_1_btn_play.png"; +const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_DETAILS = L"T01_1_controlbar_icon_detail.png"; +const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_DETAILS_CLOSE = L"T01_controlbar_icon_detail_close.png"; +const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_DOWNLOAD = L"T01_1_controlbar_icon_download.png"; +const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_SAVE = L"T01_1_controlbar_icon_save.png"; +const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_X = L"T02_controlbar_icon_cancel.png"; +const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_EDIT_NAME = L"T01_button_rename.png"; +const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_EDIT_NAME_NORMAL_BACKGROUND = L"T01_btn_circle_bg_normal.png"; +const wchar_t* IDB_IMAGE_VIEWERFORM_BUTTON_EDIT_NAME_NORMAL_BACKGROUND_PRESS = L"T01_btn_circle_bg_press.png"; +const wchar_t* IDB_IMAGE_VIEWERFORM_MORE_NORMAL = L"00_icon_more.png"; +const wchar_t* IDB_IMAGE_VIEWERFORM_MORE_PRESSED = L"00_icon_more_press.png"; +const wchar_t* IDB_IMAGE_VIEWERFORM_FOOTER_ICON_SHARE_NORMAL = L"T01_controlbar_icon_share02.png"; +const wchar_t* IDB_IMAGE_VIEWERFORM_FOOTER_ICON_DELETE_NORMAL = L"T01_controlbar_icon_delete.png"; + +const wchar_t* IDB_IMAGE_SETTERFORM_BUTTON_SET = L"T01_btn_SetCallerimage.png"; +const wchar_t* IDB_IMAGE_SETTERFORM_BUTTON_SET_PRESS = L"T01_btn_SetCallerimage_press.png"; +const wchar_t* IDB_IMAGE_SETTERFORM_BUTTON_CANCEL = L"T01_btn_cancel.png"; +const wchar_t* IDB_IMAGE_SETTERFORM_BUTTON_CANCEL_PRESS = L"T01_btn_cancel_press.png"; + +const wchar_t* SECTION_NAME_GALLERY = L"GALLRY_SETTING"; +const wchar_t* SECTION_NAME_IMAGE_VIEWER = L"IMAGE_VIEWER_SETTING"; +const wchar_t* SECTION_NAME_VIDEO_PLAYER = L"VIDEO_PLAYER_SETTING"; +const wchar_t* ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_INTERVAL = L"SLIDESHOW_INTERVAL_VALUE"; +const wchar_t* ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_TRANSITION_EFFECT = L"TRANSITION_EFFECT_VALUE"; +const wchar_t* ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_MUSIC = L"MUSIC_VALUE";