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_Animation.h
19 * @brief This is the header file for the _Animation class.
21 * This header file contains the declarations of the %_Animation class.
23 #ifndef _FUI_CTRL_INTERNAL_ANIMATION_H_
24 #define _FUI_CTRL_INTERNAL_ANIMATION_H_
26 #include <FBaseRtTimer.h>
27 #include <FBaseRtITimerEventListener.h>
28 #include <FUiCtrlAnimation.h>
29 #include <FUiCtrlAnimationFrame.h>
30 #include <FUiIAnimationEventListener.h>
31 #include "FUi_Control.h"
32 #include "FUiCtrl_AnimationEvent.h"
33 #include "FUiCtrl_IAnimationEventListener.h"
35 namespace Tizen { namespace Ui
37 class _AccessibilityElement;
40 namespace Tizen { namespace Ui { namespace Controls
43 class _AnimationPresenter;
47 : public Tizen::Ui::_Control
48 , public Tizen::Base::Runtime::ITimerEventListener
49 , virtual public Tizen::Base::Runtime::IEventListener
50 , virtual public Tizen::Ui::_IUiEventListener
51 , virtual public Tizen::Ui::_IUiEventPreviewer
53 DECLARE_CLASS_BEGIN(_Animation, Tizen::Ui::_Control);
54 DECLARE_PROPERTY("repeatCount", GetPropertyRepeatCount, SetPropertyRepeatCount);
59 virtual ~_Animation(void);
61 result SetPropertyRepeatCount(const Tizen::Ui::Variant& repeatCount);
62 Tizen::Ui::Variant GetPropertyRepeatCount(void) const;
64 result AddAnimationEventListener(const _IAnimationEventListener& listener);
65 result RemoveAnimationEventListener(const _IAnimationEventListener& listener);
66 result SetAnimationFrames(const Tizen::Base::Collection::IList& animationFrames);
67 void SetImageCount(int imageCount);
68 result SetRepeatCount(int count);
69 Tizen::Base::Collection::IList* GetAnimationFrames(void) const;
70 int GetRepeatCount(void) const;
71 int GetImageCount(void) const;
72 int GetCurrentRepeatedCount(void) const;
76 AnimationStatus GetStatus(void) const;
78 virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
79 virtual void OnDraw(void);
80 virtual result OnAttachedToMainTree(void);
81 virtual void OnBoundsChanged(void);
83 static _Animation* CreateAnimationN(void);
86 _Animation(const _Animation& rhs);
87 _Animation& operator =(const _Animation& rhs);
90 _AnimationPresenter* __pAnimationPresenter;
91 Tizen::Ui::Control* __pControlAnimation;
92 _AnimationEvent* __pAnimationEvent;
93 Tizen::Base::Collection::IList* __pAnimationFrames;
94 Tizen::Ui::_AccessibilityElement* __pAccessibilityElement;
98 }}} // Tizen::Ui::Controls
100 #endif // _FUI_CTRL_INTERNAL_ANIMATION_H_