2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://floralicense.org/license/
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.
18 * @file FUiCtrl_AnimationPresenter.h
19 * @brief This is the header file for the _AnimationPresenter class.
21 * This header file contains the declarations of the %_AnimationPresenter class.
23 #ifndef _FUI_CTRL_INTERNAL_ANIMATION_PRESENTER_H_
24 #define _FUI_CTRL_INTERNAL_ANIMATION_PRESENTER_H_
26 #include <FBaseObject.h>
27 #include <FUiCtrlAnimation.h>
28 #include <FUiCtrlAnimationFrame.h>
29 #include "FUi_ControlImpl.h"
30 #include "FUiAnim_VisualElement.h"
32 namespace Tizen { namespace Ui { namespace Controls
35 class _AnimationModel;
38 class _AnimationPresenter
39 : public Tizen::Base::Object
42 virtual ~_AnimationPresenter(void);
45 bool IsTimerExpired(Tizen::Base::Runtime::Timer& timer);
46 void SetImageCount(int imageCount);
47 result SetAnimationFrames(const Tizen::Base::Collection::IList* pAnimationFrames);
48 void SetRepeatCount(int count);
49 int GetRepeatCount(void) const;
50 int GetCurrentRepeatedCount(void) const;
51 int GetImageCount(void) const;
55 AnimationStatus GetStatus(void) const;
57 static _AnimationPresenter* CreateInstanceN(const _Animation& animation);
60 _AnimationPresenter(void);
61 result Initialize(const _Animation& animation);
63 AnimationFrame* GetCurrentFrame(void) const;
64 AnimationFrame* GetNextFrame(void) const;
67 _AnimationPresenter(const _AnimationPresenter& rhs);
68 _AnimationPresenter& operator =(const _AnimationPresenter& rhs);
71 _Animation* __pAnimation;
72 _AnimationModel* __pAnimationModel;
73 Tizen::Base::Runtime::Timer* __pTimer;
74 Tizen::Base::Collection::IEnumerator* __pCurrentFrame;
75 bool __isTimerRunning;
76 Tizen::Ui::Animations::_VisualElement* __pVisualElement;
78 }; // _AnimationPresenter
80 }}} // Tizen::Ui::Controls
82 #endif // _FUI_CTRL_INTERNAL_ANIMATION_PRESENTER_H_