Revert " modify license, permission and remove ^M char"
[framework/osp/uifw.git] / src / ui / effects / inc / FUiEffects_RuntimeIEffectModelManager.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 /**
18  * @file        FUiEffects_RuntimeIEffectModelManager.h
19  * @brief       This is the header file for the IEffectModelManager class.
20  */
21
22 #ifndef _FUI_EFFECTS_INTERNAL_RUNTIME_IEFFECT_MODEL_MANAGER_H_
23 #define _FUI_EFFECTS_INTERNAL_RUNTIME_IEFFECT_MODEL_MANAGER_H_
24
25 namespace Tizen { namespace Ui { namespace Effects { namespace _Runtime
26 {
27
28 class RenderDataScene;
29
30 /**
31  * @class       IEffectModelManager
32  * @brief       This class is an interface between EffectModel and _EffectImpl
33  *                      for handling _EffectImpl events by EffectModel
34  *
35  * @since 2.0
36  */
37 class IEffectModelManager
38 {
39 public:
40         /**
41          * Virtual interface destructor
42          *
43          * @since 2.0
44          *
45          */
46         virtual ~IEffectModelManager(void)
47         {
48         }
49
50         /**
51          * Calls script function OnEffectStart, preparing effect to starting
52          *
53          * @since 2.0
54          *
55          */
56         virtual int Start(const EffectsVector<float>& effectStartInfo) = 0;
57
58         /**
59          * Stops effect performing and initializes it
60          *
61          * @since 2.0
62          *
63          */
64         virtual void Stop(bool isBreakdown, bool isInterruptedFromApplication) = 0;
65
66         /**
67          * Calculates effect
68          *
69          * @since 2.0
70          *
71          */
72         virtual void Calculate(float dt) = 0;
73
74         /**
75          * Event touch pressed handler
76          *
77          * @since 2.0
78          *
79          * @remarks             It is called from up level from corresponding event handler
80          */
81         virtual void FeedTouchPressEvent(const TouchEventScript &pos3) = 0;
82
83         /**
84          * Event touch moved handler
85          *
86          * @since 2.0
87          *
88          * @remarks             It is called from up level from corresponding event handler,
89          */
90         virtual void FeedTouchMoveEvent(const TouchEventScript &pos3) = 0;
91
92         /**
93          * Event touch released handler
94          *
95          * @since 2.0
96          *
97          * @remarks             It is called from up level from corresponding event handler,
98          */
99         virtual void FeedTouchReleaseEvent(const TouchEventScript &pos3) = 0;
100
101         /**
102          * Event touch double pressed handler
103          *
104          * @since 2.0
105          *
106          * @remarks             It is called from up level from corresponding event handler,
107          */
108         virtual void FeedTouchDoublePressEvent(const TouchEventScript &pos3) = 0;
109
110         /**
111          * Returns time passed from the effect beginning
112          *
113          * @since 2.0
114          *
115          */
116         virtual float GetCalculationPeriodForTimer(void) const = 0;
117
118         /**
119          * Returns current effect state (see enumeration _EffectState)
120          *
121          * @since 2.0
122          *
123          */
124         virtual _EffectState GetState(void) const = 0;
125
126         /**
127          * Returns effect behaviour type (see enumeration EffectType)
128          *
129          * @since 2.0
130          *
131          */
132         virtual EffectType GetType(void) const = 0;
133
134         /**
135          * Returns the pointer to collection of structure RenderData elements
136          * to up level (to renderer)
137          *
138          * @since 2.0
139          *
140          * @remarks             The size of this collection is equal to quantity of graphical surfaces;
141          *                              this function is called once from up level for renderer
142          */
143         virtual RenderDataScene* GetRenderingData(void) const = 0;
144
145         /**
146          * Updates all graphical surfaces
147          *
148          * @since 2.0
149          *
150          * @remarks             It is called by renderer timer
151          *                              for updating graphical points
152          */
153         virtual void UpdateGraphicalSurfaces(void) = 0;
154
155         virtual long GetId(void) const = 0;
156         virtual std::string GetName(void) const = 0;
157
158 }; // IEffectModelManager
159
160 } } } } // Tizen::Ui::Effects::_Runtime
161
162 #endif //_FUI_EFFECTS_INTERNAL_RUNTIME_IEFFECT_MODEL_MANAGER_H_