Updated demos to use DALi clang-format
[platform/core/uifw/dali-demo.git] / examples / animated-gradient-call-active / animated-gradient-call-active.cpp
1 /*
2 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17 #include <dali-toolkit/dali-toolkit.h>
18 #include <dali-toolkit/devel-api/visuals/animated-gradient-visual-properties-devel.h>
19 #include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
20 #include <dali/dali.h>
21 #include <dali/integration-api/debug.h>
22 #include <iostream>
23
24 using namespace Dali;
25 using namespace Dali::Toolkit;
26
27 // This example shows how to create and display animated-gradient-effect
28 //
29 namespace
30 {
31 // The value for scale-change between wearable-mobile
32 // Can be changed on App-Create time
33 Vector2 WINDOW_SIZE          = Vector2(360.0f, 360.0f);
34 Vector2 SCALED_WINDOW_SIZE   = Vector2(1.0f, 1.0f);
35 Vector3 SCALED_WINDOW_SIZE_3 = Vector3(1.0f, 1.0f, 0.0f);
36 float   SCALED_WIDTH         = 1.0f;
37 float   SCALED_HEIGHT        = 1.0f;
38 float   FONT_SCALE           = 0.25f;
39
40 // const parameters for animations
41 const float CHANGE_DURATION = 0.2f;
42
43 // const parameters for icon position and size when resolution is 360x360
44 const Vector2 ICON_CALL_SIZE             = Vector2(54.0f, 54.0f);
45 const Vector3 ICON_CALL_POSITION         = Vector3(0.0f, 0.0f, 0.0f);
46 const Vector2 ICON_DECALL_SIZE           = Vector2(54.0f, 54.0f);
47 const Vector3 ICON_DECALL_POSITION       = Vector3(141.0f, 0.0f, 0.0f);
48 const Vector2 ICON_BATTERY_SIZE          = Vector2(14.0f, 23.0f);
49 const Vector3 ICON_BATTERY_POSITION      = Vector3(0.0f, 25.5f, 0.0f);
50 const Vector2 BUTTON_CALL_START_SIZE     = Vector2(54.0f, 54.0f);
51 const Vector3 BUTTON_CALL_START_POSITION = Vector3(-141.0f, 0.0f, 0.0f);
52
53 const Vector2 BUTTON_DECALL_ICON_SIZE     = Vector2(62.0f, 62.0f);
54 const Vector3 BUTTON_DECALL_ICON_POSITION = Vector3(0.0f, 0.0f, 0.0f);
55 const Vector2 BUTTON_DECALL_SIZE          = Vector2(360.0f, 82.0f);
56 const Vector3 BUTTON_DECALL_CLIP_POSITION = Vector3(0.0f, 82.0f, 0.0f);
57 const Vector3 BUTTON_DECALL_POSITION      = Vector3(0.0f, 0.0f, 0.0f);
58
59 // icon image name
60 const char* const ICON_CALL_IMAGE(DEMO_IMAGE_DIR "Call_Accept.png");
61 const char* const ICON_DECALL_IMAGE(DEMO_IMAGE_DIR "Call_Decline.png");
62 const char* const ICON_BATTERY_IMAGE(DEMO_IMAGE_DIR "Call_Battery.png");
63 const char* const BUTTON_DECALL_ICON_IMAGE(DEMO_IMAGE_DIR "Call_Decline_wh.png");
64
65 // const parameters for string position and size and font-size when resolution is 360x360
66 const Vector2 LABEL_INCOMING_SIZE       = Vector2(156.0f, 26.0f);
67 const Vector3 LABEL_INCOMING_POSITION   = Vector3(0.0f, -47.0f, 0.0f);
68 const Vector4 LABEL_INCOMING_FONT_COLOR = Vector4(0.98f, 0.98f, 0.98f, 1.0f);
69 const float   LABEL_INCOMING_FONT_SIZE  = 21.39f;
70 const Vector2 LABEL_NAME_SIZE           = Vector2(230.0f, 45.0f);
71 const Vector3 LABEL_NAME_POSITION       = Vector3(0.0f, -2.5f, 0.0f);
72 const Vector4 LABEL_NAME_FONT_COLOR     = Vector4(0.98f, 0.98f, 0.98f, 1.0f);
73 const float   LABEL_NAME_FONT_SIZE      = 37.71f;
74 const Vector2 LABEL_NUMBER_SIZE         = Vector2(196.0f, 25.0f);
75 const Vector3 LABEL_NUMBER_POSITION     = Vector3(0.0f, 31.0f, 0.0f);
76 const Vector4 LABEL_NUMBER_FONT_COLOR   = Vector4(0.98f, 0.98f, 0.98f, 1.0f);
77 const float   LABEL_NUMBER_FONT_SIZE    = 20.55f;
78 const Vector2 LABEL_DECLINE_SIZE        = Vector2(203.0f, 25.0f);
79 const Vector3 LABEL_DECLINE_POSITION    = Vector3(0.0f, -50.5f, 0.0f);
80 const Vector4 LABEL_DECLINE_FONT_COLOR  = Vector4(0.98f, 0.98f, 0.98f, 1.0f);
81 const float   LABEL_DECLINE_FONT_SIZE   = 20.55f;
82 const Vector2 LABEL_TIME_SIZE           = Vector2(91.0f, 26.0f);
83 const Vector3 LABEL_TIME_POSITION       = Vector3(0.0f, -47.0f, 0.0f);
84 const Vector4 LABEL_TIME_FONT_COLOR     = Vector4(0.98f, 0.98f, 0.98f, 1.0f);
85 const float   LABEL_TIME_FONT_SIZE      = 21.39f;
86
87 // string string
88 const char* const LABEL_INCOMING_STR("Incoming Call");
89 const char* const LABEL_NAME_STR("Sam Smith");
90 const char* const LABEL_NUMBER_STR("+1 908-247-1695");
91 const char* const LABEL_DECLINE_STR("Decline Message");
92 const char* const LABEL_TIME_STR("1:03");
93
94 // Set style from json
95 const char* const BACKGROUND_STYLE_JSON(DEMO_STYLE_DIR "animated-gradient-call-active-style.json");
96 const char* const BACKGROUND_INCOME_STYLE_STR("IncomeBackground");
97 const char* const BACKGROUND_ACTIVE_STYLE_STR("ActiveBackground");
98 const char* const DECLINE_BUTTON_STYLE_STR("DeclineButton");
99
100 } // unnamed namespace
101
102 // This example shows how to render animated gradients
103 //
104 class CallController : public ConnectionTracker
105 {
106 public:
107   CallController(Application& application)
108   : mApplication(application),
109     mColorStart(0.0f, 0.0f, 0.0f, 0.0f),
110     mColorEnd(0.0f, 0.0f, 0.0f, 0.0f),
111     mColorReduce(0.0f, 0.0f, 0.0f, 0.0f),
112     mButtonColorStart(0.0f, 0.0f, 0.0f, 0.0f),
113     mButtonColorEnd(0.0f, 0.0f, 0.0f, 0.0f),
114     mDuration(0.0f),
115     mBackgroundDurationIncoming(0.0f),
116     mBackgroundDurationActive(0.0f),
117     mButtonDuration(0.0f),
118     mButtonDelay(0.0f)
119   {
120     // Connect to the Application's Init signal
121     mApplication.InitSignal().Connect(this, &CallController::Create);
122   }
123
124   ~CallController()
125   {
126     // Nothing to do here;
127   }
128
129   // The Init signal is received once (only) during the Application lifetime
130   void Create(Application& application)
131   {
132     // Get a handle to the main window
133     mWindow = application.GetWindow();
134     mWindow.KeyEventSignal().Connect(this, &CallController::OnKeyEvent);
135
136     // Apply custom style for background and button.
137     StyleManager::Get().ApplyTheme(BACKGROUND_STYLE_JSON);
138
139     // Get current device's width and height.
140     const Window::WindowSize windowSize = mWindow.GetSize();
141     WINDOW_SIZE                         = Vector2(windowSize.GetWidth(), windowSize.GetHeight());
142     SCALED_WINDOW_SIZE                  = WINDOW_SIZE / 360.0f;
143     SCALED_WINDOW_SIZE_3                = Vector3(SCALED_WINDOW_SIZE.x, SCALED_WINDOW_SIZE.y, 0.0f);
144     SCALED_WIDTH                        = SCALED_WINDOW_SIZE.x < SCALED_WINDOW_SIZE.y ? SCALED_WINDOW_SIZE.x : SCALED_WINDOW_SIZE.y;
145     SCALED_HEIGHT                       = SCALED_WIDTH;
146
147     // Note that this is heuristic value
148     FONT_SCALE = 0.25f * WINDOW_SIZE.y / WINDOW_SIZE.x;
149
150     mBackground = Control::New();
151     mBackground.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
152     mBackground.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER);
153     mBackground.SetProperty(Actor::Property::SIZE, WINDOW_SIZE);
154
155     mWindow.Add(mBackground);
156
157     BuildParameter();
158     SetupActors();
159     SetupAnimation();
160
161     Reset();
162   }
163
164   void OnKeyEvent(const KeyEvent& event)
165   {
166     if(event.GetState() == KeyEvent::DOWN)
167     {
168       if(IsKey(event, Dali::DALI_KEY_ESCAPE) || IsKey(event, Dali::DALI_KEY_BACK))
169       {
170         mApplication.Quit();
171       }
172     }
173   }
174
175 private:
176   // Setup const parameter values
177   void BuildParameter()
178   {
179     mDuration = CHANGE_DURATION;
180   }
181
182   void SetupActors()
183   {
184     SetupComingActors();
185     SetupActiveActors();
186   }
187
188   // Create and Add to window when visible at call incomming
189   void SetupComingActors()
190   {
191     mButtonIconDecall = ImageView::New();
192     mButtonIconDecall.SetImage(ICON_DECALL_IMAGE);
193     mButtonIconDecall.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
194     mButtonIconDecall.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER);
195     mButtonIconDecall.SetProperty(Actor::Property::SIZE, ICON_DECALL_SIZE * SCALED_WIDTH);
196     mButtonIconDecall.SetProperty(Actor::Property::POSITION, ICON_DECALL_POSITION * SCALED_WIDTH);
197
198     mButtonIconBattery = ImageView::New();
199     mButtonIconBattery.SetImage(ICON_BATTERY_IMAGE);
200     mButtonIconBattery.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER);
201     mButtonIconBattery.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER);
202     mButtonIconBattery.SetProperty(Actor::Property::SIZE, ICON_BATTERY_SIZE * SCALED_WIDTH);
203     mButtonIconBattery.SetProperty(Actor::Property::POSITION, ICON_BATTERY_POSITION * SCALED_WIDTH);
204
205     mCallStartButton = PushButton::New();
206     mCallStartButton.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
207     mCallStartButton.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER);
208     mCallStartButton.SetProperty(Actor::Property::SIZE, BUTTON_CALL_START_SIZE * SCALED_WIDTH);
209     mCallStartButton.SetProperty(Actor::Property::POSITION, BUTTON_CALL_START_POSITION * SCALED_WIDTH);
210     mCallStartButton.ClickedSignal().Connect(this, &CallController::OnButtonClicked);
211     mCallStartButton.SetProperty(Button::Property::SELECTED_BACKGROUND_VISUAL, ICON_CALL_IMAGE);
212     mCallStartButton.SetProperty(Button::Property::UNSELECTED_BACKGROUND_VISUAL, ICON_CALL_IMAGE);
213     mCallStartButton.SetProperty(Control::Property::BACKGROUND, ICON_CALL_IMAGE);
214     mCallStartButton.SetProperty(Button::Property::LABEL, "");
215
216     mWindow.Add(mCallStartButton);
217     mWindow.Add(mButtonIconDecall);
218     mWindow.Add(mButtonIconBattery);
219
220     mLabelIncoming = TextLabel::New(LABEL_INCOMING_STR);
221     mLabelIncoming.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
222     mLabelIncoming.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER);
223     mLabelIncoming.SetProperty(Actor::Property::SIZE, LABEL_INCOMING_SIZE * SCALED_WINDOW_SIZE);
224     mLabelIncoming.SetProperty(Actor::Property::POSITION, LABEL_INCOMING_POSITION * SCALED_WINDOW_SIZE_3);
225     mLabelIncoming.SetProperty(Actor::Property::VISIBLE, true);
226     mLabelIncoming.SetProperty(TextLabel::Property::TEXT_COLOR, LABEL_INCOMING_FONT_COLOR);
227     mLabelIncoming.SetProperty(TextLabel::Property::POINT_SIZE, LABEL_INCOMING_FONT_SIZE * FONT_SCALE);
228     mLabelIncoming.SetProperty(TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER");
229     mLabelIncoming.SetProperty(TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER");
230
231     mLabelName = TextLabel::New(LABEL_NAME_STR);
232     mLabelName.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
233     mLabelName.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER);
234     mLabelName.SetProperty(Actor::Property::SIZE, LABEL_NAME_SIZE * SCALED_WINDOW_SIZE);
235     mLabelName.SetProperty(Actor::Property::POSITION, LABEL_NAME_POSITION * SCALED_WINDOW_SIZE_3);
236     mLabelName.SetProperty(Actor::Property::VISIBLE, true);
237     mLabelName.SetProperty(TextLabel::Property::TEXT_COLOR, LABEL_NAME_FONT_COLOR);
238     mLabelName.SetProperty(TextLabel::Property::POINT_SIZE, LABEL_NAME_FONT_SIZE * FONT_SCALE);
239     mLabelName.SetProperty(TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER");
240     mLabelName.SetProperty(TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER");
241
242     mLabelNumber = TextLabel::New(LABEL_NUMBER_STR);
243     mLabelNumber.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
244     mLabelNumber.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER);
245     mLabelNumber.SetProperty(Actor::Property::SIZE, LABEL_NUMBER_SIZE * SCALED_WINDOW_SIZE);
246     mLabelNumber.SetProperty(Actor::Property::POSITION, LABEL_NUMBER_POSITION * SCALED_WINDOW_SIZE_3);
247     mLabelNumber.SetProperty(Actor::Property::VISIBLE, true);
248     mLabelNumber.SetProperty(TextLabel::Property::TEXT_COLOR, LABEL_NUMBER_FONT_COLOR);
249     mLabelNumber.SetProperty(TextLabel::Property::POINT_SIZE, LABEL_NUMBER_FONT_SIZE * FONT_SCALE);
250     mLabelNumber.SetProperty(TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER");
251     mLabelNumber.SetProperty(TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER");
252
253     mLabelDecline = TextLabel::New(LABEL_DECLINE_STR);
254     mLabelDecline.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER);
255     mLabelDecline.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER);
256     mLabelDecline.SetProperty(Actor::Property::SIZE, LABEL_DECLINE_SIZE * SCALED_WINDOW_SIZE);
257     mLabelDecline.SetProperty(Actor::Property::POSITION, LABEL_DECLINE_POSITION * SCALED_WIDTH);
258     mLabelDecline.SetProperty(Actor::Property::VISIBLE, true);
259     mLabelDecline.SetProperty(TextLabel::Property::TEXT_COLOR, LABEL_DECLINE_FONT_COLOR);
260     mLabelDecline.SetProperty(TextLabel::Property::POINT_SIZE, LABEL_DECLINE_FONT_SIZE * FONT_SCALE);
261     mLabelDecline.SetProperty(TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER");
262     mLabelDecline.SetProperty(TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER");
263
264     mWindow.Add(mLabelIncoming);
265     mWindow.Add(mLabelName);
266     mWindow.Add(mLabelNumber);
267     mWindow.Add(mLabelDecline);
268   }
269
270   // Create and Add to window when visible at call active
271   void SetupActiveActors()
272   {
273     mButtonClip = Control::New();
274     mButtonClip.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER);
275     mButtonClip.SetProperty(Actor::Property::ANCHOR_POINT, ParentOrigin::BOTTOM_CENTER);
276     mButtonClip.SetProperty(Actor::Property::SIZE, BUTTON_DECALL_SIZE * SCALED_WIDTH);
277     mButtonClip.SetProperty(Actor::Property::POSITION, BUTTON_DECALL_CLIP_POSITION * SCALED_WIDTH);
278
279     mButtonIcon = ImageView::New();
280     mButtonIcon.SetImage(BUTTON_DECALL_ICON_IMAGE);
281     mButtonIcon.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
282     mButtonIcon.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER);
283     mButtonIcon.SetProperty(Actor::Property::SIZE, BUTTON_DECALL_ICON_SIZE * SCALED_WIDTH);
284     mButtonIcon.SetProperty(Actor::Property::POSITION, BUTTON_DECALL_ICON_POSITION * SCALED_WIDTH);
285
286     mCallEndButton = PushButton::New();
287     mCallEndButton.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
288     mCallEndButton.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER);
289     mCallEndButton.SetProperty(Actor::Property::SIZE, BUTTON_DECALL_SIZE * SCALED_WIDTH);
290     mCallEndButton.SetProperty(Actor::Property::POSITION, BUTTON_DECALL_POSITION * SCALED_WIDTH);
291     mCallEndButton.ClickedSignal().Connect(this, &CallController::OnButtonClicked);
292     mCallEndButton.SetProperty(Button::Property::SELECTED_BACKGROUND_VISUAL, "");
293     mCallEndButton.SetProperty(Button::Property::UNSELECTED_BACKGROUND_VISUAL, "");
294     mCallEndButton.SetStyleName(DECLINE_BUTTON_STYLE_STR);
295     mCallEndButton.SetProperty(Button::Property::LABEL, "");
296
297     mButtonClip.Add(mCallEndButton);
298     mButtonClip.Add(mButtonIcon);
299
300     mLabelTime = TextLabel::New(LABEL_TIME_STR);
301     mLabelTime.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER);
302     mLabelTime.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER);
303     mLabelTime.SetProperty(Actor::Property::SIZE, LABEL_TIME_SIZE * SCALED_WINDOW_SIZE);
304     mLabelTime.SetProperty(Actor::Property::POSITION, LABEL_TIME_POSITION * SCALED_WINDOW_SIZE_3);
305     mLabelTime.SetProperty(Actor::Property::VISIBLE, false);
306     mLabelTime.SetProperty(TextLabel::Property::TEXT_COLOR, LABEL_TIME_FONT_COLOR);
307     mLabelTime.SetProperty(TextLabel::Property::POINT_SIZE, LABEL_TIME_FONT_SIZE * FONT_SCALE);
308     mLabelTime.SetProperty(TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER");
309     mLabelTime.SetProperty(TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER");
310
311     mWindow.Add(mLabelTime);
312   }
313
314   void SetupAnimation()
315   {
316     mMoveFront = Animation::New(mDuration);
317     mMoveBack  = Animation::New(mDuration);
318
319     mMoveFront.AnimateTo(Property(mButtonClip, Actor::Property::POSITION_Y), 0.0f * SCALED_HEIGHT);
320     mMoveBack.AnimateTo(Property(mButtonClip, Actor::Property::POSITION_Y), BUTTON_DECALL_CLIP_POSITION.y * SCALED_HEIGHT);
321
322     mMoveFront.AnimateTo(Property(mCallStartButton, Actor::Property::VISIBLE), false);
323     mMoveFront.AnimateTo(Property(mButtonIconDecall, Actor::Property::VISIBLE), false);
324     mMoveBack.AnimateTo(Property(mCallStartButton, Actor::Property::VISIBLE), true);
325     mMoveBack.AnimateTo(Property(mButtonIconDecall, Actor::Property::VISIBLE), true);
326
327     mMoveFront.AnimateTo(Property(mLabelIncoming, Actor::Property::VISIBLE), false);
328     mMoveFront.AnimateTo(Property(mLabelNumber, Actor::Property::VISIBLE), false);
329     mMoveFront.AnimateTo(Property(mLabelTime, Actor::Property::VISIBLE), true);
330     mMoveBack.AnimateTo(Property(mLabelIncoming, Actor::Property::VISIBLE), true);
331     mMoveBack.AnimateTo(Property(mLabelNumber, Actor::Property::VISIBLE), true);
332     mMoveBack.AnimateTo(Property(mLabelTime, Actor::Property::VISIBLE), false);
333   }
334
335   bool OnButtonClicked(Button button)
336   {
337     if(button == mCallStartButton)
338     {
339       mBackground.SetStyleName(BACKGROUND_ACTIVE_STYLE_STR);
340       mWindow.Add(mButtonClip);
341       mMoveFront.Play();
342     }
343     else if(button == mCallEndButton)
344     {
345       mBackground.SetStyleName(BACKGROUND_INCOME_STYLE_STR);
346       mTempTimer = Timer::New(mDuration * 1000.0f);
347       mTempTimer.TickSignal().Connect(this, &CallController::smallTick);
348       mTempTimer.Start();
349       mMoveBack.Play();
350     }
351     return true;
352   }
353   bool smallTick()
354   {
355     mButtonClip.Unparent();
356     return false;
357   }
358
359   void Reset()
360   {
361     mBackground.SetStyleName(BACKGROUND_INCOME_STYLE_STR);
362   }
363
364 private:
365   Application& mApplication;
366   Window       mWindow;
367
368   Control mBackground;
369
370   // Show when call incommint
371   PushButton mCallStartButton;
372   ImageView  mButtonIconDecall;
373   ImageView  mButtonIconBattery;
374   TextLabel  mLabelIncoming;
375   TextLabel  mLabelName;
376   TextLabel  mLabelNumber;
377   TextLabel  mLabelDecline;
378
379   // Show when call active
380   PushButton mCallEndButton;
381   ImageView  mButtonIcon;
382   Control    mButtonBackground;
383   Control    mButtonClip;
384   TextLabel  mLabelTime;
385
386   Timer mTempTimer;
387
388   Animation mMoveFront;
389   Animation mMoveBack;
390
391   Vector4 mColorStart;
392   Vector4 mColorEnd;
393   Vector4 mColorReduce;
394
395   Vector4 mButtonColorStart;
396   Vector4 mButtonColorEnd;
397
398   float mDuration;
399   float mBackgroundDurationIncoming;
400   float mBackgroundDurationActive;
401   float mButtonDuration;
402   float mButtonDelay;
403 };
404
405 int DALI_EXPORT_API main(int argc, char** argv)
406 {
407   Application application = Application::New(&argc, &argv);
408
409   CallController test(application);
410
411   application.MainLoop();
412   return 0;
413 }