--- /dev/null
+Flora License
+
+Version 1.1, April, 2013
+
+http://floralicense.org/license/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction,
+and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by
+the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and
+all other entities that control, are controlled by, or are
+under common control with that entity. For the purposes of
+this definition, "control" means (i) the power, direct or indirect,
+to cause the direction or management of such entity,
+whether by contract or otherwise, or (ii) ownership of fifty percent (50%)
+or more of the outstanding shares, or (iii) beneficial ownership of
+such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity
+exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.
+
+"Object" form shall mean any form resulting from mechanical
+transformation or translation of a Source form, including but
+not limited to compiled object code, generated documentation,
+and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form,
+made available under the License, as indicated by a copyright notice
+that is included in or attached to the work (an example is provided
+in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent,
+as a whole, an original work of authorship. For the purposes of this License,
+Derivative Works shall not include works that remain separable from,
+or merely link (or bind by name) to the interfaces of, the Work and
+Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original
+version of the Work and any modifications or additions to that Work or
+Derivative Works thereof, that is intentionally submitted to Licensor
+for inclusion in the Work by the copyright owner or by an individual or
+Legal Entity authorized to submit on behalf of the copyright owner.
+For the purposes of this definition, "submitted" means any form of
+electronic, verbal, or written communication sent to the Licensor or
+its representatives, including but not limited to communication on
+electronic mailing lists, source code control systems, and issue
+tracking systems that are managed by, or on behalf of, the Licensor
+for the purpose of discussing and improving the Work, but excluding
+communication that is conspicuously marked or otherwise designated
+in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity
+on behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.
+
+"Tizen Certified Platform" shall mean a software platform that complies
+with the standards set forth in the Tizen Compliance Specification
+and passes the Tizen Compliance Tests as defined from time to time
+by the Tizen Technical Steering Group and certified by the Tizen
+Association or its designated agent.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+this License, each Contributor hereby grants to You a perpetual,
+worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+copyright license to reproduce, prepare Derivative Works of,
+publicly display, publicly perform, sublicense, and distribute the
+Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+this License, each Contributor hereby grants to You a perpetual,
+worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+(except as stated in this section) patent license to make, have made,
+use, offer to sell, sell, import, and otherwise transfer the Work
+solely as incorporated into a Tizen Certified Platform, where such
+license applies only to those patent claims licensable by such
+Contributor that are necessarily infringed by their Contribution(s)
+alone or by combination of their Contribution(s) with the Work solely
+as incorporated into a Tizen Certified Platform to which such
+Contribution(s) was submitted. If You institute patent litigation
+against any entity (including a cross-claim or counterclaim
+in a lawsuit) alleging that the Work or a Contribution incorporated
+within the Work constitutes direct or contributory patent infringement,
+then any patent licenses granted to You under this License for that
+Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+Work or Derivative Works thereof pursuant to the copyright license
+above, in any medium, with or without modifications, and in Source or
+Object form, provided that You meet the following conditions:
+
+ 1. You must give any other recipients of the Work or Derivative Works
+ a copy of this License; and
+ 2. You must cause any modified files to carry prominent notices stating
+ that You changed the files; and
+ 3. You must retain, in the Source form of any Derivative Works that
+ You distribute, all copyright, patent, trademark, and attribution
+ notices from the Source form of the Work, excluding those notices
+ that do not pertain to any part of the Derivative Works; and
+ 4. If the Work includes a "NOTICE" text file as part of its distribution,
+ then any Derivative Works that You distribute must include a readable
+ copy of the attribution notices contained within such NOTICE file,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works, in at least one of the following places:
+ within a NOTICE text file distributed as part of the Derivative Works;
+ within the Source form or documentation, if provided along with the
+ Derivative Works; or, within a display generated by the Derivative Works,
+ if and wherever such third-party notices normally appear.
+ The contents of the NOTICE file are for informational purposes only
+ and do not modify the License. You may add Your own attribution notices
+ within Derivative Works that You distribute, alongside or as an addendum
+ to the NOTICE text from the Work, provided that such additional attribution
+ notices cannot be construed as modifying the License. You may add Your own
+ copyright statement to Your modifications and may provide additional or
+ different license terms and conditions for use, reproduction, or
+ distribution of Your modifications, or for any such Derivative Works
+ as a whole, provided Your use, reproduction, and distribution of
+ the Work otherwise complies with the conditions stated in this License
+ and your own copyright statement or terms and conditions do not conflict
+ the conditions stated in the License including section 3.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+any Contribution intentionally submitted for inclusion in the Work
+by You to the Licensor shall be under the terms and conditions of
+this License, without any additional terms or conditions.
+Notwithstanding the above, nothing herein shall supersede or modify
+the terms of any separate license agreement you may have executed
+with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+names, trademarks, service marks, or product names of the Licensor,
+except as required for reasonable and customary use in describing the
+origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+agreed to in writing, Licensor provides the Work (and each
+Contributor provides its Contributions) on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+implied, including, without limitation, any warranties or conditions
+of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+PARTICULAR PURPOSE. You are solely responsible for determining the
+appropriateness of using or redistributing the Work and assume any
+risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+whether in tort (including negligence), contract, or otherwise,
+unless required by applicable law (such as deliberate and grossly
+negligent acts) or agreed to in writing, shall any Contributor be
+liable to You for damages, including any direct, indirect, special,
+incidental, or consequential damages of any character arising as a
+result of this License or out of the use or inability to use the
+Work (including but not limited to damages for loss of goodwill,
+work stoppage, computer failure or malfunction, or any and all
+other commercial damages or losses), even if such Contributor
+has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+the Work or Derivative Works thereof, You may choose to offer,
+and charge a fee for, acceptance of support, warranty, indemnity,
+or other liability obligations and/or rights consistent with this
+License. However, in accepting such obligations, You may act only
+on Your own behalf and on Your sole responsibility, not on behalf
+of any other Contributor, and only if You agree to indemnify,
+defend, and hold each Contributor harmless for any liability
+incurred by, or claims asserted against, such Contributor by reason
+of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Flora License to your work
+
+To apply the Flora License to your work, attach the following
+boilerplate notice, with the fields enclosed by brackets "[]"
+replaced with your own identifying information. (Don't include
+the brackets!) The text should be enclosed in the appropriate
+comment syntax for the file format. We also recommend that a
+file or class name and description of purpose be included on the
+same "printed page" as the copyright notice for easier
+identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Flora License, Version 1.1 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://floralicense.org/license/
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
--- /dev/null
+Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
+Except as noted, this software is licensed under Flora License, Version 1.1
+Please, see the LICENSE.Flora file for Flora License, Version 1.1 terms and conditions.
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<?xml-stylesheet type="text/xsl" href="../../../../description.xsl"?>
+
+<Overview version="0.17.1">
+ <SampleName> EffectsApp </SampleName>
+ <SampleVersion>1.0</SampleVersion>
+ <Preview>screenshot.png</Preview>
+ <Description>
+The EffectsApp sample application demonstrates how you can play 3D effects and animations.
+ </Description>
+</Overview>
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#ifndef DRAWPANEL_H_
+#define DRAWPANEL_H_
+
+#include <FUi.h>
+
+class DrawPanel
+ : public Tizen::Ui::Controls::Panel
+{
+public:
+ DrawPanel();
+ virtual ~DrawPanel();
+
+ virtual void DrawBitmap(Tizen::Graphics::Bitmap* pBtimapToDraw);
+ virtual result OnDraw(void);
+
+private:
+ const Tizen::Graphics::Bitmap* __pBitmap;
+};
+
+#endif /* DRAWPANEL_H_ */
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#ifndef _EFFECTS_APP_H_
+#define _EFFECTS_APP_H_
+
+#include <FApp.h>
+#include <FBase.h>
+#include <FSystem.h>
+#include <FUiEffects.h>
+
+/**
+ * [EffectsApp] UiApp must inherit from UiApp class
+ * which provides basic features necessary to define an UiApp.
+ */
+class EffectsApp
+ : public Tizen::App::Application
+ , public Tizen::System::IScreenEventListener
+{
+public:
+ /**
+ * [Test] UiApp must have a factory method that creates an instance of itself.
+ */
+ static Tizen::App::Application* CreateInstance(void);
+
+ EffectsApp(void);
+ virtual ~EffectsApp(void);
+
+ // Called when the UiApp is initializing.
+ virtual bool OnAppInitializing(Tizen::App::AppRegistry& appRegistry);
+
+ // Called when the UiApp initializing is finished.
+ virtual bool OnAppInitialized(void);
+
+ // Called when the UiApp is requested to terminate.
+ virtual bool OnAppWillTerminate(void);
+
+ // Called when the UiApp is terminating.
+ virtual bool OnAppTerminating(Tizen::App::AppRegistry& appRegistry, bool forcedTermination = false);
+
+ // Called when the UiApp's frame moves to the top of the screen.
+ virtual void OnForeground(void);
+
+ // Called when this UiApp's frame is moved from top of the screen to the background.
+ virtual void OnBackground(void);
+
+ // Called when the system memory is not sufficient to run the UiApp any further.
+ virtual void OnLowMemory(void);
+
+ // Called when the battery level changes.
+ virtual void OnBatteryLevelChanged(Tizen::System::BatteryLevel batteryLevel);
+
+ // Called when the screen turns on.
+ virtual void OnScreenOn(void);
+
+ // Called when the screen turns off.
+ virtual void OnScreenOff(void);
+};
+
+#endif //_EFFECTS_APP_H_
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#ifndef _EFFECTS_APP_FRAME_H_
+#define _EFFECTS_APP_FRAME_H_
+
+#include <FBase.h>
+#include <FUi.h>
+
+class EffectsAppFrame
+ : public Tizen::Ui::Controls::Frame
+{
+public:
+ EffectsAppFrame(void);
+ virtual ~EffectsAppFrame(void);
+
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+};
+
+#endif // _EFFECTS_APP_FRAME_H_
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#ifndef _EFFECTS_BASE_FORM_H_
+#define _EFFECTS_BASE_FORM_H_
+
+#include <FUi.h>
+#include <FBase.h>
+#include "DrawPanel.h"
+
+const int COUNT_OF_BITMAPS = 4;
+
+class EffectsBaseForm
+ : public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::Controls::IFormBackEventListener
+ , public Tizen::Ui::ITouchEventListener
+ , public Tizen::Ui::Effects::IEffectEventListener
+ , public Tizen::Ui::Effects::IEffectResourceProvider
+ , public Tizen::Ui::IActionEventListener
+{
+public:
+ EffectsBaseForm(void);
+ virtual ~EffectsBaseForm(void);
+
+ bool Initialize(void);
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId){}
+
+ virtual void InitializeFooterItems(){};
+
+ virtual void InitializeEffect(void){};
+ virtual void TerminateEffect(void){};
+ void SetBitmaps(void);
+ void DeleteBitmaps(void);
+ void SetBackgroundImage(long bitmapId);
+
+ //IFormBackEventListener
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+
+ //IEffectEventListener
+ //Called on effect started
+ virtual void OnEffectStarted(Tizen::Ui::Effects::Effect& effect);
+
+ //Called on effect finished
+ virtual void OnEffectFinished(Tizen::Ui::Effects::Effect& effect, Tizen::Ui::Effects::EffectResult effectResult, const Tizen::Base::Collection::IList& lastShownBitmapIds);
+
+ //IEffectResourceProvider
+ //Called when effect requires an image
+ virtual result SetBitmap(Tizen::Ui::Effects::Effect& effect, long bitmapID);
+
+ //ITouchEventListener
+ virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
+ virtual void OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
+ virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)=0;
+ virtual void OnTouchLongPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
+ virtual void OnTouchDoublePressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
+ virtual void OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
+ virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
+ virtual void OnTouchCanceled(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
+
+protected:
+ Tizen::Ui::Controls::Panel* __pEffectsPanel;
+ DrawPanel* __pDrawBitmapPanel;
+
+ Tizen::Ui::Effects::Effect* __pCurrentEffect;
+
+ Tizen::Ui::Effects::EffectManager* __pEffectManager;
+ Tizen::Graphics::Bitmap* __pBitmaps[COUNT_OF_BITMAPS];
+ int __currentBitmap;
+ bool __flagPressed;
+
+ //The identifiers of bitmaps for images of current, next and previous pages:
+ const long CURRENT_BITMAP_ID;
+ const long NEXT_BITMAP_ID;
+ const long PREVIOUS_BITMAP_ID;
+};
+
+#endif // _EFFECTS_BASE_FORM_H_
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#ifndef _FORM_FACTORY_H_
+#define _FORM_FACTORY_H_
+
+#include <FUi.h>
+
+
+// Use 'extern' to eliminate duplicate data allocation.
+extern const wchar_t* FORM_MAIN_MENU;
+extern const wchar_t* FORM_EFFECT_INTERACTIVE;
+extern const wchar_t* FORM_EFFECT_TIMEBASED;
+
+
+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 // _FORM_FACTORY_H_
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#ifndef INTERACTIVEEFFECTS_H_
+#define INTERACTIVEEFFECTS_H_
+
+#include "EffectsBaseForm.h"
+
+class InteractiveEffects
+ : public EffectsBaseForm
+{
+public:
+ InteractiveEffects();
+ virtual ~InteractiveEffects();
+
+ virtual void InitializeFooterItems(void);
+ virtual void InitializeEffect(void);
+ virtual void TerminateEffect(void);
+
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+
+ //ITouchEventListener
+ virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+ virtual void OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+ virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+ virtual void OnTouchCanceled(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+
+private:
+
+ static const int ID_FOOTER_BUTTON_FIRST = 101;
+ static const int ID_FOOTER_BUTTON_SECOND = 102;
+
+ static const int COUNT_OF_EFFECTS = 2;
+ Tizen::Ui::Effects::Effect* __pEffect [COUNT_OF_EFFECTS];
+};
+
+#endif /* INTERACTIVEEFFECTS_H_ */
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#ifndef _MAIN_FORM_H_
+#define _MAIN_FORM_H_
+
+#include <FUi.h>
+#include <FBase.h>
+
+class MainForm
+ : public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::Controls::IListViewItemEventListener
+ , public Tizen::Ui::Controls::IListViewItemProvider
+ , public Tizen::Ui::Controls::IFormBackEventListener
+{
+public:
+ MainForm(void);
+ virtual ~MainForm(void);
+
+ bool Initialize(void);
+
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+
+ //IFormBackEventListener
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+
+ //IListViewItemProvider
+ int GetItemCount(void);
+ Tizen::Ui::Controls::ListItemBase* CreateItem (int index, int itemWidth);
+ bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase *pItem, int itemWidth);
+
+ //IListViewItemEventListener
+ void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView &listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);
+ void OnListViewItemSwept(Tizen::Ui::Controls::ListView &listView, int index, Tizen::Ui::Controls::SweepDirection direction){};
+ void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView &listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state){};
+
+private:
+ static const int LIST_VIEW_MAIN_MENU_COUNT = 2;
+
+ Tizen::Ui::Controls::Header* __pHeader;
+ Tizen::Ui::Controls::ListView* __pListViewMainMenu;
+ Tizen::Base::String __listViewMainMenuNameArray[LIST_VIEW_MAIN_MENU_COUNT];
+};
+
+#endif // _MAIN_FORM_H_
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#ifndef _PANEL_FACTORY_H_
+#define _PANEL_FACTORY_H_
+
+#include <FUi.h>
+
+
+// Use 'extern' to eliminate duplicate data allocation.
+extern const wchar_t* PANEL_EFFECTS;
+
+
+class PanelFactory
+ : public Tizen::Ui::Scenes::IPanelFactory
+{
+public:
+ PanelFactory(void);
+ virtual ~PanelFactory(void);
+
+ virtual Tizen::Ui::Controls::Panel* CreatePanelN(const Tizen::Base::String& panelId, const Tizen::Ui::Scenes::SceneId& sceneId);
+};
+
+#endif // _PANEL_FACTORY_H_
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#ifndef _SCENE_CHANGE_LOGGER_H_
+#define _SCENE_CHANGE_LOGGER_H_
+
+#include <FBase.h>
+#include <FUi.h>
+
+
+class SceneChangeLogger
+ : public Tizen::Ui::Scenes::ISceneManagerEventListener
+{
+public:
+ SceneChangeLogger(void);
+ virtual ~SceneChangeLogger(void);
+
+ virtual void OnSceneTransitionStarted(const Tizen::Ui::Scenes::SceneId ¤tSceneId,
+ const Tizen::Ui::Scenes::SceneId &nextSceneId);
+ virtual void OnSceneTransitionCompleted(const Tizen::Ui::Scenes::SceneId &previousSceneId,
+ const Tizen::Ui::Scenes::SceneId ¤tSceneId);
+ int GetLogListCount(void);
+ Tizen::Base::String GetLog(int index);
+
+private:
+ Tizen::Base::Collection::IListT<Tizen::Base::String>* __pChangeLogList;
+};
+
+#endif // _SCENE_CHANGE_LOGGER_H_
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#ifndef _SCENE_REGISTER_H_
+#define _SCENE_REGISTER_H_
+
+#include "SceneChangeLogger.h"
+
+// Use 'extern' to eliminate duplicate data allocation.
+extern const wchar_t* SCENE_MAIN_MENU;
+extern const wchar_t* SCENE_EFFECT_INTERACRIVE;
+extern const wchar_t* SCENE_EFFECT_TIMEBASED;
+
+class SceneChangeLogger;
+
+class SceneRegister
+{
+public:
+ static void RegisterAllScenes(void);
+ static SceneChangeLogger changeLogger;
+
+private:
+ SceneRegister(void);
+ ~SceneRegister(void);
+};
+
+#endif // _SCENE_REGISTER_H_
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#ifndef _SCENE_TRANSITION_POLICY_PROVIDER_H_
+#define _SCENE_TRANSITION_POLICY_PROVIDER_H_
+
+#include <FUi.h>
+
+
+class SceneTransitionPolicyProvider
+ : public Tizen::Ui::Scenes::ISceneTransitionPolicyProvider
+{
+public:
+ SceneTransitionPolicyProvider(void);
+ virtual ~SceneTransitionPolicyProvider(void);
+
+ virtual Tizen::Ui::Scenes::SceneId GetNextScene(const Tizen::Ui::Scenes::SceneId& currentSceneId,
+ const Tizen::Base::Collection::IList* pArgs);
+};
+
+#endif // _SCENE_TRANSITION_POLICY_PROVIDER_H_
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#ifndef TIMEBASEDEFFECTS_H_
+#define TIMEBASEDEFFECTS_H_
+
+#include "EffectsBaseForm.h"
+
+class TimebasedEffects
+ : public EffectsBaseForm
+{
+public:
+ TimebasedEffects();
+ virtual ~TimebasedEffects();
+
+ virtual void InitializeFooterItems(void);
+ virtual void InitializeEffect(void);
+ virtual void TerminateEffect(void);
+
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+
+private:
+ static const int ID_FOOTER_BUTTON_FIRST = 101;
+ static const int ID_FOOTER_BUTTON_SECOND = 102;
+
+ static const int COUNT_OF_EFFECTS = 2;
+ Tizen::Ui::Effects::Effect* __pEffect [COUNT_OF_EFFECTS];
+};
+
+#endif /* TIMEBASEDEFFECTS_H_ */
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<Manifest xmlns="http://schemas.tizen.org/2012/12/manifest">
+ <Id>$(manifestAppId)</Id>
+ <Version>1.0.0</Version>
+ <Type>C++App</Type>
+ <Requirements>
+ <Feature Name="http://tizen.org/feature/screen.size.normal">true</Feature>
+ </Requirements>
+ <Author/>
+ <Apps>
+ <ApiVersion>2.2</ApiVersion>
+ <Privileges/>
+ <UiApp Main="True" MenuIconVisible="True" Name="$(projectName)">
+ <UiScalability BaseScreenSize="Normal" CoordinateSystem="Logical" LogicalCoordinate="720"/>
+ <UiTheme SystemTheme="White"/>
+ <DisplayNames>
+ <DisplayName Locale="eng-GB">$(projectName)</DisplayName>
+ </DisplayNames>
+ <Icons>
+ <Icon Section="MainMenu" Type="Xhigh">mainmenu.png</Icon>
+ </Icons>
+ <LaunchConditions/>
+ <Notifications/>
+ </UiApp>
+ </Apps>
+</Manifest>
--- /dev/null
+dummy file
\ No newline at end of file
--- /dev/null
+dummy file
\ No newline at end of file
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "DrawPanel.h"
+
+using namespace Tizen::Graphics;
+
+DrawPanel::DrawPanel(void)
+ : __pBitmap(null)
+{
+
+}
+
+DrawPanel::~DrawPanel(void)
+{
+
+}
+
+void
+DrawPanel::DrawBitmap(Tizen::Graphics::Bitmap* pBtimapToDraw)
+{
+ __pBitmap = pBtimapToDraw;
+ Draw();
+}
+
+result
+DrawPanel::OnDraw(void)
+{
+ result r = E_SUCCESS;
+
+ Canvas* pCanvas = GetCanvasN();
+ if(pCanvas != null)
+ {
+ pCanvas->DrawBitmap(pCanvas->GetBounds(), *__pBitmap);
+ delete pCanvas;
+ }
+
+ return r;
+}
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "EffectsApp.h"
+#include "EffectsAppFrame.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::System;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Effects;
+
+EffectsApp::EffectsApp(void)
+{
+}
+
+EffectsApp::~EffectsApp(void)
+{
+}
+
+UiApp*
+EffectsApp::CreateInstance(void)
+{
+ // Create the instance through the constructor.
+ return new (std::nothrow) EffectsApp();
+}
+
+bool
+EffectsApp::OnAppInitializing(AppRegistry& appRegistry)
+{
+ // Create a Frame
+ EffectsAppFrame* pEffectsAppFrame = new (std::nothrow) EffectsAppFrame;
+ pEffectsAppFrame->Construct();
+ pEffectsAppFrame->SetName(L"EffectsApp");
+ AddFrame(*pEffectsAppFrame);
+
+ return true;
+}
+
+bool
+EffectsApp::OnAppInitialized(void)
+{
+ return true;
+}
+
+bool
+EffectsApp::OnAppWillTerminate(void)
+{
+ return true;
+}
+
+bool
+EffectsApp::OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination)
+{
+ EffectManager::DestroyInstance();
+
+ return true;
+}
+
+void
+EffectsApp::OnForeground(void)
+{
+ return;
+}
+
+void
+EffectsApp::OnBackground(void)
+{
+ return;
+}
+
+void
+EffectsApp::OnLowMemory(void)
+{
+ return;
+}
+
+void
+EffectsApp::OnBatteryLevelChanged(BatteryLevel batteryLevel)
+{
+ return;
+}
+
+void
+EffectsApp::OnScreenOn(void)
+{
+ return;
+}
+
+void
+EffectsApp::OnScreenOff(void)
+{
+ return;
+}
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * This file contains the Tizen application entry point.
+ */
+
+#include <new>
+#include "EffectsApp.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif // __cplusplus
+
+_EXPORT_ int OspMain(int argc, char *pArgv[]);
+
+/**
+ * The entry function of Tizen application called by the operating system.
+ */
+int
+OspMain(int argc, char *pArgv[])
+{
+ result r = E_SUCCESS;
+
+ AppLog("Application started.");
+ ArrayList args;
+ args.Construct();
+ for (int i = 0; i < argc; i++)
+ {
+ args.Add(*(new (std::nothrow) String(pArgv[i])));
+ }
+
+ r = Tizen::App::Application::Execute(EffectsApp::CreateInstance, &args);
+ TryLog(r == E_SUCCESS, "[%s] Application execution failed", GetErrorMessage(r));
+
+ args.RemoveAll(true);
+ AppLog("Application finished.");
+
+ return static_cast<int>(r);
+}
+#ifdef __cplusplus
+}
+#endif // __cplusplus
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "EffectsAppFrame.h"
+#include "SceneRegister.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+EffectsAppFrame::EffectsAppFrame(void)
+{
+}
+
+EffectsAppFrame::~EffectsAppFrame(void)
+{
+}
+
+result
+EffectsAppFrame::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+
+ // SceneManagement initializing
+ SceneRegister::RegisterAllScenes();
+ // Goto the first scene.
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager);
+ r = pSceneManager->GoForward(ForwardSceneTransition(SCENE_MAIN_MENU));
+ TryReturn(!IsFailed(r), false, "%s", GetErrorMessage(r));
+
+ return r;
+}
+
+result
+EffectsAppFrame::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+ return r;
+}
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "EffectsBaseForm.h"
+#include "SceneRegister.h"
+#include <FIo.h>
+#include <FApp.h>
+#include <FMedia.h>
+
+using namespace Tizen::App;
+using namespace Tizen::Media;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Effects;
+using namespace Tizen::Ui::Scenes;
+
+//The names of the image files:
+const wchar_t IMAGE1[] = L"image0.jpg";
+const wchar_t IMAGE2[] = L"image1.jpg";
+const wchar_t IMAGE3[] = L"image2.jpg";
+const wchar_t IMAGE4[] = L"image3.jpg";
+
+EffectsBaseForm::EffectsBaseForm(void)
+ : __pEffectsPanel(null)
+ , __pCurrentEffect(null)
+ , __pEffectManager(EffectManager::GetInstance())
+ , __currentBitmap(0)
+ , __flagPressed(false)
+ , CURRENT_BITMAP_ID(0)
+ , NEXT_BITMAP_ID(1)
+ , PREVIOUS_BITMAP_ID(2)
+{
+ for (int i = 0; i < COUNT_OF_BITMAPS; ++i)
+ {
+ __pBitmaps[i] = null;
+ }
+}
+
+EffectsBaseForm::~EffectsBaseForm(void)
+{
+ DeleteBitmaps();
+}
+
+bool
+EffectsBaseForm::Initialize()
+{
+ Construct(FORM_STYLE_NORMAL | FORM_STYLE_HEADER | FORM_STYLE_PORTRAIT_INDICATOR | FORM_STYLE_FOOTER);
+ SetFormBackEventListener(this);
+
+ return true;
+}
+
+result
+EffectsBaseForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+
+ SetBackgroundColor(Color::GetColor(COLOR_ID_WHITE));
+
+ Footer* pFooter = GetFooter();
+ InitializeFooterItems();
+
+ __pEffectsPanel = new Panel();
+ Tizen::Graphics::Rectangle boundsHeader(GetHeader()->GetBounds());
+ Tizen::Graphics::Rectangle boundsForm(GetBounds());
+ Tizen::Graphics::Rectangle bounds(boundsForm.x, (boundsHeader.y + boundsHeader.height) * 0, boundsForm.width, boundsForm.height-(boundsHeader.y + boundsHeader.height + pFooter->GetBounds().height));
+ __pEffectsPanel->Construct(bounds);
+ __pEffectsPanel->SetShowState(false);
+
+ __pDrawBitmapPanel = new DrawPanel();
+ __pDrawBitmapPanel->Construct(bounds);
+ __pDrawBitmapPanel->AddTouchEventListener(*this);
+
+ AddControl(__pDrawBitmapPanel);
+ AddControl(__pEffectsPanel);
+
+ //Register effects:
+ InitializeEffect();
+ SetBitmaps();
+ __pDrawBitmapPanel->DrawBitmap(__pBitmaps[__currentBitmap]);
+
+ return r;
+}
+
+result
+EffectsBaseForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+
+ TerminateEffect();
+
+ return r;
+}
+
+void
+EffectsBaseForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager);
+ pSceneManager->GoForward(ForwardSceneTransition(SCENE_MAIN_MENU));
+}
+
+void
+EffectsBaseForm::SetBitmaps()
+{
+ DeleteBitmaps();
+
+ Image image;
+ image.Construct();
+
+ __pBitmaps[0] = image.DecodeN(Tizen::App::App::GetInstance()->GetAppResourcePath() + IMAGE1, BITMAP_PIXEL_FORMAT_ARGB8888);
+ __pBitmaps[1] = image.DecodeN(Tizen::App::App::GetInstance()->GetAppResourcePath() + IMAGE2, BITMAP_PIXEL_FORMAT_ARGB8888);
+ __pBitmaps[2] = image.DecodeN(Tizen::App::App::GetInstance()->GetAppResourcePath() + IMAGE3, BITMAP_PIXEL_FORMAT_ARGB8888);
+ __pBitmaps[3] = image.DecodeN(Tizen::App::App::GetInstance()->GetAppResourcePath() + IMAGE4, BITMAP_PIXEL_FORMAT_ARGB8888);
+}
+
+void
+EffectsBaseForm::DeleteBitmaps()
+{
+ for (int i = 0; i < COUNT_OF_BITMAPS; i++)
+ {
+ if (__pBitmaps[i] != null)
+ {
+ delete __pBitmaps[i];
+ __pBitmaps[i] = null;
+ }
+ }
+}
+
+void
+EffectsBaseForm::OnEffectStarted(Effect& effect)
+{
+ __pEffectsPanel->SetShowState(true);
+}
+
+void
+EffectsBaseForm::OnEffectFinished(Effect& effect, EffectResult effectResult, const Tizen::Base::Collection::IList& lastShownBitmapIds)
+{
+ __pEffectsPanel->SetShowState(false);
+ SetBackgroundImage((dynamic_cast< const Tizen::Base::Long* >(lastShownBitmapIds.GetAt(0)))->value);
+}
+
+result
+EffectsBaseForm::SetBitmap(Effect& effect, long bitmapID)
+{
+ result r = E_OPERATION_FAILED;
+
+ int nextBitmap = (__currentBitmap + 1) % COUNT_OF_BITMAPS;
+ int previousBitmap = (__currentBitmap + COUNT_OF_BITMAPS - 1) % COUNT_OF_BITMAPS;
+
+ if (bitmapID == CURRENT_BITMAP_ID && __pBitmaps[__currentBitmap] != null)
+ {
+ r = effect.SetBitmap(bitmapID, *__pBitmaps[__currentBitmap]);
+ }
+ else if (bitmapID == NEXT_BITMAP_ID &&__pBitmaps[nextBitmap] != null)
+ {
+ r = effect.SetBitmap(bitmapID, *__pBitmaps[nextBitmap]);
+ }
+ else if (bitmapID == PREVIOUS_BITMAP_ID && __pBitmaps[previousBitmap] != null)
+ {
+ r = effect.SetBitmap(bitmapID, *__pBitmaps[previousBitmap]);
+ }
+
+ return r;
+}
+
+void
+EffectsBaseForm::SetBackgroundImage(long bitmapId)
+{
+ int nextBitmap = (__currentBitmap + 1) % COUNT_OF_BITMAPS;
+ int previousBitmap = (__currentBitmap + COUNT_OF_BITMAPS - 1) % COUNT_OF_BITMAPS;
+
+ if (bitmapId == NEXT_BITMAP_ID)
+ {
+ __currentBitmap = nextBitmap;
+ }
+ else if (bitmapId == PREVIOUS_BITMAP_ID)
+ {
+ __currentBitmap = previousBitmap;
+ }
+
+ __pDrawBitmapPanel->DrawBitmap(__pBitmaps[__currentBitmap]);
+}
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include <new>
+#include "FormFactory.h"
+#include "MainForm.h"
+#include "InteractiveEffects.h"
+#include "TimebasedEffects.h"
+
+
+using namespace Tizen::Ui::Scenes;
+
+// Definitions of extern.
+const wchar_t* FORM_MAIN_MENU = L"FormMainMenu";
+const wchar_t* FORM_EFFECT_INTERACTIVE = L"FormActiveInteractive";
+const wchar_t* FORM_EFFECT_TIMEBASED = L"FormTimebased";
+
+FormFactory::FormFactory(void)
+{
+}
+
+FormFactory::~FormFactory(void)
+{
+}
+
+Tizen::Ui::Controls::Form*
+FormFactory::CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Scenes::SceneId& sceneId)
+{
+ Tizen::Ui::Controls::Form* pNewForm = null;
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager);
+
+ if (formId == FORM_MAIN_MENU)
+ {
+ MainForm* pForm = new (std::nothrow) MainForm();
+ pForm->Initialize();
+ pNewForm = pForm;
+ }
+ else if (formId == FORM_EFFECT_INTERACTIVE)
+ {
+ InteractiveEffects* pForm = new (std::nothrow) InteractiveEffects();
+ pForm->Initialize();
+ pNewForm = pForm;
+ }
+ else if (formId == FORM_EFFECT_TIMEBASED)
+ {
+ TimebasedEffects* pForm = new (std::nothrow) TimebasedEffects();
+ pForm->Initialize();
+// pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+
+ return pNewForm;
+}
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "InteractiveEffects.h"
+
+#include <FIo.h>
+#include <FApp.h>
+
+using namespace Tizen::Ui::Controls;
+InteractiveEffects::InteractiveEffects()
+{
+ for (int i = 0; i < COUNT_OF_EFFECTS; ++i)
+ {
+ __pEffect[i] = null;
+ }
+}
+
+InteractiveEffects::~InteractiveEffects()
+{
+}
+
+void
+InteractiveEffects::InitializeFooterItems(void)
+{
+ Footer* pFooter = GetFooter();
+ if (pFooter != null)
+ {
+ FooterItem item1;
+ item1.Construct(ID_FOOTER_BUTTON_FIRST);
+ item1.SetText(L"Slide");
+
+ FooterItem item2;
+ item2.Construct(ID_FOOTER_BUTTON_SECOND);
+ item2.SetText(L"Cloth");
+
+ pFooter->AddItem(item1);
+ pFooter->AddItem(item2);
+
+ pFooter->AddActionEventListener(*this);
+ }
+
+ Header* pHeader = GetHeader();
+ if(pHeader != null)
+ {
+ pHeader->SetTitleText(L"Interactive effects");
+ }
+}
+
+void
+InteractiveEffects::InitializeEffect(void)
+{
+ if(__pEffectManager != null)
+ {
+ // Create effect:
+ __pEffect[0] = __pEffectManager->CreateEffect(Tizen::App::UiApp::GetInstance()->GetAppResourcePath() + L"slide.eff");
+ if(__pEffect[0] != null)
+ {
+ __pEffect[0]->SetRenderTarget(__pEffectsPanel);
+ __pEffect[0]->SetEffectEventListener(this);
+ __pEffect[0]->SetResourceProvider(this);
+ }
+
+ // Create effect:
+ __pEffect[1] = __pEffectManager->CreateEffect(Tizen::App::UiApp::GetInstance()->GetAppResourcePath() + L"cloth.eff");
+ if(__pEffect[1] != null)
+ {
+ __pEffect[1]->SetRenderTarget(__pEffectsPanel);
+ __pEffect[1]->SetEffectEventListener(this);
+ __pEffect[1]->SetResourceProvider(this);
+ }
+ }
+
+ __pCurrentEffect = __pEffect[0];
+}
+
+void
+InteractiveEffects::TerminateEffect()
+{
+ if(__pEffectManager != null)
+ {
+ for (int i = 0; i < COUNT_OF_EFFECTS; ++i)
+ {
+ __pEffectManager->DestroyEffect(*__pEffect[i]);
+ __pEffect[i] = null;
+ }
+ }
+
+ __pCurrentEffect = null;
+}
+
+void
+InteractiveEffects::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
+{
+ switch(actionId)
+ {
+ case ID_FOOTER_BUTTON_FIRST:
+ __pCurrentEffect = __pEffect[0];
+ break;
+ case ID_FOOTER_BUTTON_SECOND:
+ __pCurrentEffect = __pEffect[1];
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+InteractiveEffects::OnTouchCanceled(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
+{
+ OnTouchReleased(source, currentPosition, touchInfo);
+}
+
+void
+InteractiveEffects::OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
+{
+ __flagPressed = true;
+
+ if (__pCurrentEffect != null)
+ {
+ //Calculate coordinates of touch point relatively to screen:
+ Tizen::Graphics::Point offset = source.GetBounds().GetTopLeft();
+ Tizen::Graphics::Point p = touchInfo.GetCurrentPosition() + source.GetBounds().GetTopLeft();
+
+ // Add offset to get position relatively to screen:
+ __pCurrentEffect->FeedTouchPressEvent(touchInfo, offset);
+ }
+}
+
+void
+InteractiveEffects::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
+{
+ //Switch to new image with effect:
+ if(__pCurrentEffect != null)
+ {
+ //Calculate coordinates of touch point relatively to screen:
+ Tizen::Graphics::Point offset = source.GetBounds().GetTopLeft();
+ Tizen::Graphics::Point p = touchInfo.GetCurrentPosition() + source.GetBounds().GetTopLeft();
+ // if current effect is already running then pass coordinates of new touch point:
+ if (__pCurrentEffect->IsRunning())
+ {
+ __pCurrentEffect->FeedTouchMoveEvent(touchInfo, offset);
+ }
+ else
+ {
+ // Start effect:
+ if (__flagPressed)
+ {
+ __pCurrentEffect->Start();
+ __pCurrentEffect->FeedTouchMoveEvent(touchInfo, offset);
+ }
+ }
+ }
+ //Switch to new image without effect:
+ else
+ {
+ if (__flagPressed)
+ {
+ if (touchInfo.GetCurrentPosition().x < touchInfo.GetStartPosition().x)
+ {
+ SetBackgroundImage(NEXT_BITMAP_ID);
+ }
+ else
+ {
+ SetBackgroundImage(PREVIOUS_BITMAP_ID);
+ }
+ }
+ }
+
+ __flagPressed = false;
+}
+
+void
+InteractiveEffects::OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
+{
+ if(__pCurrentEffect != null)
+ {
+ Tizen::Graphics::Point offset = source.GetBounds().GetTopLeft();
+
+ // Add offset to get position relatively to screen:
+ __pCurrentEffect->FeedTouchReleaseEvent(touchInfo, offset);
+ }
+}
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "SceneRegister.h"
+#include "MainForm.h"
+#include <FApp.h>
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+
+MainForm::MainForm(void)
+ : __pHeader(null)
+ , __pListViewMainMenu(null)
+{
+}
+
+MainForm::~MainForm(void)
+{
+}
+
+bool
+MainForm::Initialize(void)
+{
+ Construct(FORM_STYLE_NORMAL | FORM_STYLE_HEADER | FORM_STYLE_PORTRAIT_INDICATOR);
+ SetFormBackEventListener(this);
+
+ return true;
+}
+
+result
+MainForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+ __pHeader = GetHeader();
+ __pHeader->SetTitleText(L"Effects app");
+
+ __listViewMainMenuNameArray[0] = L"Interactive effects";
+ __listViewMainMenuNameArray[1] = L"Time-based effects";
+
+ __pListViewMainMenu = new (std::nothrow) ListView();
+ __pListViewMainMenu->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height), true, false);
+ __pListViewMainMenu->SetItemProvider(*this);
+ __pListViewMainMenu->AddListViewItemEventListener(*this);
+ AddControl(__pListViewMainMenu);
+
+ return r;
+}
+
+result
+MainForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+
+ return r;
+}
+
+void
+MainForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
+{
+ UiApp* pApp = UiApp::GetInstance();
+ AppAssert(pApp);
+ pApp->Terminate();
+}
+
+int
+MainForm::GetItemCount(void)
+{
+ return LIST_VIEW_MAIN_MENU_COUNT;
+}
+
+Tizen::Ui::Controls::ListItemBase*
+MainForm::CreateItem(int index, int itemWidth)
+{
+ SimpleItem* pItem = new (std::nothrow) SimpleItem();
+ pItem->Construct(Tizen::Graphics::Dimension(itemWidth, 112), LIST_ANNEX_STYLE_NORMAL);
+ pItem->SetElement(__listViewMainMenuNameArray[index], null);
+
+ return pItem;
+}
+
+bool
+MainForm::DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+MainForm::OnListViewItemStateChanged(ListView& listView, int index, int elementId, ListItemStatus status)
+{
+ Tizen::Ui::Scenes::SceneManager* pSceneManager = Tizen::Ui::Scenes::SceneManager::GetInstance();
+ AppAssert(pSceneManager);
+
+ switch (index)
+ {
+ case 0:
+ pSceneManager->GoForward(Tizen::Ui::Scenes::ForwardSceneTransition(SCENE_EFFECT_INTERACRIVE));
+ break;
+
+ case 1:
+ pSceneManager->GoForward(Tizen::Ui::Scenes::ForwardSceneTransition(SCENE_EFFECT_TIMEBASED));
+ break;
+ }
+}
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include <new>
+#include "PanelFactory.h"
+
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+// Definitions of extern.
+const wchar_t* PANEL_EFFECTS = L"EffectsPanel";
+
+PanelFactory::PanelFactory(void)
+{
+}
+
+PanelFactory::~PanelFactory(void)
+{
+}
+
+Tizen::Ui::Controls::Panel*
+PanelFactory::CreatePanelN(const Tizen::Base::String& panelId, const Tizen::Ui::Scenes::SceneId& sceneId)
+{
+ Tizen::Ui::Controls::Panel* newPanel = new Tizen::Ui::Controls::Panel;
+ return newPanel;
+}
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include <new>
+#include "SceneChangeLogger.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+
+
+SceneChangeLogger::SceneChangeLogger(void)
+ : __pChangeLogList(null)
+{
+ __pChangeLogList = new (std::nothrow) ArrayListT<Tizen::Base::String>;
+ AppAssert(__pChangeLogList);
+}
+
+SceneChangeLogger::~SceneChangeLogger(void)
+{
+ delete __pChangeLogList;
+}
+
+int
+SceneChangeLogger::GetLogListCount(void)
+{
+ return __pChangeLogList->GetCount();
+}
+
+Tizen::Base::String
+SceneChangeLogger::GetLog(int index)
+{
+ String str;
+ __pChangeLogList->GetAt(index, str);
+ return str;
+}
+
+void
+SceneChangeLogger::OnSceneTransitionStarted(const Tizen::Ui::Scenes::SceneId ¤tSceneId,
+ const Tizen::Ui::Scenes::SceneId &nextSceneId)
+{
+ static unsigned int count = 0;
+ String str;
+ str.Format(100, L"%ld: ", ++count);
+ if (currentSceneId.GetLength() > 0)
+ {
+ str += currentSceneId;
+ }
+ else
+ {
+ str += L"N/A";
+ }
+ str += L" > ";
+ str += nextSceneId;
+
+ __pChangeLogList->Add(str);
+ if (__pChangeLogList->GetCount() > 100) // Limit to max 100 logs
+ {
+ __pChangeLogList->RemoveAt(0);
+ }
+}
+
+void
+SceneChangeLogger::OnSceneTransitionCompleted(const Tizen::Ui::Scenes::SceneId &previousSceneId,
+ const Tizen::Ui::Scenes::SceneId ¤tSceneId)
+{
+
+}
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "SceneRegister.h"
+#include "FormFactory.h"
+#include "PanelFactory.h"
+#include "SceneChangeLogger.h"
+#include "SceneTransitionPolicyProvider.h"
+#include <FUi.h>
+
+using namespace Tizen::Ui::Scenes;
+
+// Definitions of extern.
+const wchar_t* SCENE_MAIN_MENU = L"ScnMainMenu";
+const wchar_t* SCENE_EFFECT_INTERACRIVE = L"ScnEffectInteractive";
+const wchar_t* SCENE_EFFECT_TIMEBASED = L"ScnEffectTimebased";
+
+SceneChangeLogger SceneRegister::changeLogger;
+
+SceneRegister::SceneRegister(void)
+{
+}
+
+SceneRegister::~SceneRegister(void)
+{
+}
+
+void
+SceneRegister::RegisterAllScenes(void)
+{
+ static const wchar_t* PANEL_BLANK = L"";
+ static FormFactory formFactory;
+ static PanelFactory panelFactory;
+ static SceneTransitionPolicyProvider policyProvider;
+
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager);
+ pSceneManager->RegisterFormFactory(formFactory);
+ pSceneManager->RegisterPanelFactory(panelFactory);
+ pSceneManager->SetSceneTransitionPolicyProvider(&policyProvider);
+ pSceneManager->AddSceneManagerEventListener(SceneRegister::changeLogger);
+
+ pSceneManager->RegisterScene(SCENE_MAIN_MENU, FORM_MAIN_MENU, PANEL_BLANK);
+ pSceneManager->RegisterScene(SCENE_EFFECT_INTERACRIVE, FORM_EFFECT_INTERACTIVE, PANEL_BLANK);
+ pSceneManager->RegisterScene(SCENE_EFFECT_TIMEBASED, FORM_EFFECT_TIMEBASED, PANEL_BLANK);
+}
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "SceneTransitionPolicyProvider.h"
+#include "SceneRegister.h"
+
+using namespace Tizen::Ui::Scenes;
+
+SceneTransitionPolicyProvider::SceneTransitionPolicyProvider(void)
+{
+}
+
+SceneTransitionPolicyProvider::~SceneTransitionPolicyProvider(void)
+{
+}
+
+Tizen::Ui::Scenes::SceneId
+SceneTransitionPolicyProvider::GetNextScene(const Tizen::Ui::Scenes::SceneId& currentSceneId,
+ const Tizen::Base::Collection::IList* pArgs)
+{
+ AppLog("osp::ui::effects %c", currentSceneId.GetPointer());
+ if (currentSceneId == SCENE_MAIN_MENU)
+ {
+ return SCENE_EFFECT_INTERACRIVE;
+ }
+ else if (currentSceneId == SCENE_EFFECT_INTERACRIVE)
+ {
+ return SCENE_MAIN_MENU;
+ }
+
+ return L"";
+}
--- /dev/null
+//
+// Tizen C++ SDK
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include "TimebasedEffects.h"
+#include <FIo.h>
+#include <FApp.h>
+
+using namespace Tizen::Ui::Controls;
+
+TimebasedEffects::TimebasedEffects()
+{
+ for (int i = 0; i < COUNT_OF_EFFECTS; ++i)
+ {
+ __pEffect[i] = null;
+ }
+}
+
+TimebasedEffects::~TimebasedEffects()
+{
+}
+
+void
+TimebasedEffects::InitializeFooterItems(void)
+{
+ Footer* pFooter = GetFooter();
+ if (pFooter != null)
+ {
+ FooterItem item1;
+ item1.Construct(ID_FOOTER_BUTTON_FIRST);
+ item1.SetText(L"Paper");
+
+ FooterItem item2;
+ item2.Construct(ID_FOOTER_BUTTON_SECOND);
+ item2.SetText(L"Rotation");
+
+ pFooter->AddItem(item1);
+ pFooter->AddItem(item2);
+
+ pFooter->AddActionEventListener(*this);
+ }
+
+ Header* pHeader = GetHeader();
+ if(pHeader != null)
+ {
+ pHeader->SetTitleText(L"Time-based effects");
+ }
+}
+
+void
+TimebasedEffects::InitializeEffect(void)
+{
+ if(__pEffectManager != null)
+ {
+ // Create effect:
+ __pEffect[0] = __pEffectManager->CreateEffect(Tizen::App::App::GetInstance()->GetAppResourcePath() + L"paper-timebased.eff");
+ if(__pEffect[0] != null)
+ {
+ __pEffect[0]->SetRenderTarget(__pEffectsPanel);
+ __pEffect[0]->SetEffectEventListener(this);
+ __pEffect[0]->SetResourceProvider(this);
+ }
+
+ // Create effect:
+ __pEffect[1] = __pEffectManager->CreateEffect(Tizen::App::App::GetInstance()->GetAppResourcePath() + L"rotate-turn.eff");
+ if(__pEffect[1] != null)
+ {
+ __pEffect[1]->SetRenderTarget(__pEffectsPanel);
+ __pEffect[1]->SetEffectEventListener(this);
+ __pEffect[1]->SetResourceProvider(this);
+ }
+ }
+ __pCurrentEffect = __pEffect[0];
+}
+
+void
+TimebasedEffects::TerminateEffect(void)
+{
+ if(__pEffectManager != null)
+ {
+ for (int i = 0; i < COUNT_OF_EFFECTS; ++i)
+ {
+ __pEffectManager->DestroyEffect(*__pEffect[i]);
+ __pEffect[i] = null;
+ }
+ }
+
+ __pCurrentEffect = null;
+}
+
+void
+TimebasedEffects::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
+{
+ switch(actionId)
+ {
+ case ID_FOOTER_BUTTON_FIRST:
+ __pCurrentEffect = __pEffect[0];
+ break;
+ case ID_FOOTER_BUTTON_SECOND:
+ __pCurrentEffect = __pEffect[1];
+ break;
+
+ default:
+ break;
+ }
+}
+
+
+void
+TimebasedEffects::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
+{
+ //Switch to new image with effect. Start effect:
+ if(__pCurrentEffect != null && __pCurrentEffect->IsRunning() == false)
+ {
+ Tizen::Base::Collection::ArrayList effectStartInfo;
+ effectStartInfo.Construct();
+
+ int x, y, width, height;
+ Tizen::App::UiApp::GetInstance()->GetFrameAt(0)->GetBounds(x, y, width, height);
+
+ Tizen::Base::Float positionInfo(static_cast<float>(touchInfo.GetCurrentPosition().y) / static_cast<float>(height));
+ Tizen::Base::Float direction(1.0f);
+ effectStartInfo.Add(positionInfo);
+ effectStartInfo.Add(direction);
+ __pCurrentEffect->Start(effectStartInfo);
+ }
+ //Switch to new image without effect:
+ else
+ {
+ if (touchInfo.GetCurrentPosition().x != touchInfo.GetStartPosition().x && __flagPressed)
+ {
+ SetBackgroundImage(NEXT_BITMAP_ID);
+ }
+ }
+
+ __flagPressed = false;
+}
--- /dev/null
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<template>
+
+ <slp-property>
+ <property-group>
+ <sample-name>EffectsApp</sample-name>
+ <category>Sample</category>
+ <sdk-version>1.00</sdk-version>
+ <project-type>org.tizen.nativecpp.buildArtefactType.app</project-type>
+ <sample-description>description.xml</sample-description>
+ </property-group>
+ </slp-property>
+
+ <process type="org.tizen.nativeappcommon.TizenCopyFolder">
+ <simple name="projectName" value="$(projectName)"/>
+ <simple name="folderPath" value="project"/>
+ <complex-array name="replaceableFiles">
+ <element>
+ <simple name="sourcePath" value="manifest.xml"/>
+ <simple name="targetPath" value="manifest.xml"/>
+ <simple name="replaceable" value = "true"/>
+ </element>
+ </complex-array>
+ </process>
+ <process type="org.tizen.nativecpp.SetDefaultFrameworks">
+ <simple name="projectName" value="$(projectName)"/>
+ <complex-array name="frameworkList">
+ <element>
+ <simple name="framework" value="osp"/>
+ </element>
+ </complex-array>
+ </process>
+
+</template>