1 #ifndef __DALI_INTERNAL_ANIMATION_PLAYLIST_H__
2 #define __DALI_INTERNAL_ANIMATION_PLAYLIST_H__
5 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/public-api/animation/animation.h>
23 #include <dali/public-api/common/dali-vector.h>
24 #include <dali/public-api/common/vector-wrapper.h>
25 #include <dali/internal/event/common/complete-notification-interface.h>
36 * AnimationPlaylist provides notifications to applications when animations are finished.
37 * It reference-counts playing animations, to allow "fire and forget" behaviour.
39 class AnimationPlaylist : public CompleteNotificationInterface
44 * Create an AnimationPlaylist.
45 * @return A newly allocated animation playlist.
47 static AnimationPlaylist* New();
52 virtual ~AnimationPlaylist();
55 * Called when an animation is constructed.
57 void AnimationCreated( Animation& animation );
60 * Called when an animation is destroyed.
62 void AnimationDestroyed( Animation& animation );
65 * Called when an animation is playing.
66 * @post The animation will be referenced by AnimationPlaylist, until the "Finished" signal is emitted.
68 void OnPlay( Animation& animation );
71 * Called when an animation is cleared.
72 * @post The animation will no longer be referenced by AnimationPlaylist.
74 void OnClear( Animation& animation );
79 * Create an AnimationPlaylist.
84 AnimationPlaylist(const AnimationPlaylist&);
87 AnimationPlaylist& operator=(const AnimationPlaylist& rhs);
89 private: // from CompleteNotificationInterface
92 * @copydoc CompleteNotificationInterface::NotifyCompleted()
94 virtual void NotifyCompleted();
98 Dali::Vector< Animation* > mAnimations; ///< All existing animations (not owned)
99 std::vector< Dali::Animation > mPlaylist; ///< The currently playing animations (owned through handle)
103 } // namespace Internal
107 #endif // __DALI_INTERNAL_NOTIFICATION_MANAGER_H__