Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / inc / FUiCtrl_AnimationImpl.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                FUiCtrl_AnimationImpl.h
19  * @brief               This is the header file for the _AnimationImpl class.
20  *
21  * This header file contains the declarations of the %_AnimationImpl class.
22  */
23 #ifndef _FUI_CTRL_INTERNAL_ANIMATION_IMPL_H_
24 #define _FUI_CTRL_INTERNAL_ANIMATION_IMPL_H_
25
26 #include <FUiCtrlAnimation.h>
27 #include "FUi_ControlImpl.h"
28 #include "FUiCtrl_IAnimationEventListener.h"
29 #include "FUiCtrl_PublicAnimationEvent.h"
30 #include "FUiCtrl_Animation.h"
31
32 namespace Tizen { namespace Ui { namespace Controls
33 {
34
35 class _AnimationImpl
36         : public _ControlImpl
37         , public _IAnimationEventListener
38         , virtual public Tizen::Base::Runtime::IEventListener
39 {
40
41 public:
42         virtual ~_AnimationImpl(void);
43
44         result SetAnimationFrames(const Tizen::Base::Collection::IList& animationFrames);
45         void SetImageCount(int imageCount);
46         result AddAnimationEventListener(Tizen::Ui::IAnimationEventListener& listener);
47         result RemoveAnimationEventListener(Tizen::Ui::IAnimationEventListener& listener);
48         result SetRepeatCount(int count);
49         int GetRepeatCount(void) const;
50         int GetCurrentRepeatedCount(void) const;
51         int GetImageCount(void) const;
52         result Play(void);
53         result Stop(void);
54         result Pause(void);
55         AnimationStatus GetStatus(void) const;
56
57         virtual const char* GetPublicClassName(void) const;
58         virtual const Animation& GetPublic(void) const;
59         virtual Animation& GetPublic(void);
60         virtual const _Animation& GetCore(void) const;
61         virtual _Animation& GetCore(void);
62         virtual void OnAnimationStopped(const Tizen::Ui::_Control& source);
63
64         static _AnimationImpl* CreateAnimationImplN(Animation* pControl);
65         static _AnimationImpl* GetInstance(Animation& animation);
66         static const _AnimationImpl* GetInstance(const Animation& animation);
67
68 private:
69         _AnimationImpl(Animation* pPublic, _Animation* pCore);
70         _AnimationImpl(const _AnimationImpl& rhs);
71         _AnimationImpl& operator =(const _AnimationImpl& rhs);
72
73 private:
74         _PublicAnimationEvent* __pPublicAnimationEvent;
75
76 };  // _AnimationImpl
77
78 }}} // Tizen::Ui::Controls
79
80 #endif  //_FUI_CTRL_INTERNAL_ANIMATION_IMPL_H_