1.1 --- a/epoc32/include/animationmixins.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/animationmixins.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,165 @@
1.4 -animationmixins.h
1.5 +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +#ifndef __ANIMATIONMIXINS_H__
1.21 +#define __ANIMATIONMIXINS_H__
1.22 +
1.23 +#include <e32base.h>
1.24 +
1.25 +/** Interface from a data provider to an animation
1.26 +
1.27 +An animation which has a data provider receives information from it via this
1.28 +interface.
1.29 +
1.30 +You do not need to derive an implementation from this class unless you are
1.31 +writing a new animation type.
1.32 +
1.33 +@publishedAll
1.34 +@released
1.35 +@see CAnimationDataProvider
1.36 +@see CAnimation
1.37 +@see CAnimator*/
1.38 +class MAnimationDataProviderObserver
1.39 + {
1.40 +public:
1.41 + /** Receives an event from a data provider.
1.42 + @param aEvent The event code.
1.43 + @param aData Any data associated with the event. Can be NULL.
1.44 + @param aDataSize The size in bytes of the item pointed to by aData.*/
1.45 + virtual void DataProviderEventL(TInt aEvent, TAny* aData, TInt aDataSize) = 0;
1.46 +protected:
1.47 + IMPORT_C virtual void MAnimationDataProviderObserver_Reserved1();
1.48 + IMPORT_C virtual void MAnimationDataProviderObserver_Reserved2();
1.49 + };
1.50 +
1.51 +class CAnimationTicker;
1.52 +
1.53 +/** Interface used by an animator to during the rendering process.
1.54 +
1.55 +A class implementing this interface is provided to an animator by an animation.
1.56 +It may or may not be the animation itself.
1.57 +
1.58 +You do not need to derive an implementation from this class unless you are
1.59 +writing a new animation type.
1.60 +
1.61 +@publishedAll
1.62 +@released
1.63 +@see CAnimator*/
1.64 +class MAnimationDrawer
1.65 + {
1.66 +public:
1.67 + /** Called by the animator when it needs to draw a new frame */
1.68 + virtual void AnimatorDraw() = 0;
1.69 + /** Called by the animator when it is ready to begin running.
1.70 + @param aSize The size of the smallest bounding rectangle that will be required to render the animation */
1.71 + virtual void AnimatorInitialisedL(const TSize& aSize) = 0;
1.72 + /** Called by the animator when it is no longer ready, usually in
1.73 + response to TAnimationEvent::EAnimationDataChanged */
1.74 + virtual void AnimatorResetL() = 0;
1.75 + /** Called by the animator plugin loading routine to determine the type
1.76 + of data for which an animator is required.
1.77 + @return An 8 bit descriptor containing the data type.*/
1.78 + virtual const TPtrC8 AnimatorDataType() const = 0;
1.79 + /** Called by the animator to obtain an AnimatorTicker, to which it will
1.80 + add itself whenever it is running.
1.81 + @return A reference to a CAnimationTicker.*/
1.82 + virtual CAnimationTicker& AnimatorTicker() = 0;
1.83 +private:
1.84 + IMPORT_C virtual void MAnimationDrawer_Reserved1();
1.85 + IMPORT_C virtual void MAnimationDrawer_Reserved2();
1.86 + };
1.87 +
1.88 +class CAnimation;
1.89 +
1.90 +/** Interface used by an animation to report events to the client application.
1.91 +
1.92 +An animation can inform the client application of particular events through this
1.93 +mechanism. Only errors are reported in this way in v9.1, but more events may
1.94 +be added in future.
1.95 +
1.96 +Use of this interface by the client application is optional.
1.97 +
1.98 +@publishedAll
1.99 +@released
1.100 +@see CAnimation*/
1.101 +class MAnimationObserver
1.102 + {
1.103 +public:
1.104 + /** Represents generic events which can be sent to the observer. */
1.105 + enum TEvent
1.106 + {
1.107 + /** Indicates that an error has occurred in the data provider.
1.108 + For events of this type, aData is a pointer to a TInt error code. */
1.109 + EDataProviderError,
1.110 + /** Indicates that the animator initialised (and therefore knows it's size) */
1.111 + EAnimationInitialized=0x01,
1.112 + /** Any user defined animations introducing new events should use
1.113 + values greater than EReserved */
1.114 + EReserved=0xFFFF,
1.115 + };
1.116 +public:
1.117 + /** Receives events from an animation.
1.118 +
1.119 + The receiver is not required to take any action atall in response to this
1.120 + call. The receiver should not delete the animation whilst responding
1.121 + to this call.
1.122 +
1.123 + @param aSender A reference to the animation which sent the event.
1.124 + @param aEvent The event code.
1.125 + @param aData An event specific data item.*/
1.126 + virtual void AnimationEvent(CAnimation& aSender, TInt aEvent, TAny* aData) = 0;
1.127 +protected:
1.128 + IMPORT_C virtual void MAnimationObserver_Reserved1();
1.129 + IMPORT_C virtual void MAnimationObserver_Reserved2();
1.130 + };
1.131 +
1.132 +/** Interface used for receiving animation ticks.
1.133 +
1.134 +Animators receive regular ticks, during which they perform any required processing.
1.135 +
1.136 +You do not need to derive an implementation from this class unless you are writing
1.137 +a new animator type.
1.138 +
1.139 +@publishedAll
1.140 +@released
1.141 +@see CAnimator
1.142 +@see CAnimationTicker*/
1.143 +class MAnimationTickee
1.144 + {
1.145 +public:
1.146 + /** This function is called regularly by any ticker to which the tickee
1.147 + has been added */
1.148 + virtual void Tick() = 0;
1.149 +protected:
1.150 + IMPORT_C virtual void MAnimationTickee_Reserved1();
1.151 + IMPORT_C virtual void MAnimationTickee_Reserved2();
1.152 + };
1.153 +
1.154 +/** Internal interface used by the ICL data loader to communicate with the
1.155 +ICL data provider. Not intended for user derivation.
1.156 +@internalComponent*/
1.157 +class MICLAnimationDataLoaderObserver
1.158 + {
1.159 +public:
1.160 + enum TDataLoaderEvent
1.161 + {
1.162 + EImagePartialConvert,
1.163 + EImageConvertComplete,
1.164 + };
1.165 +public:
1.166 + IMPORT_C virtual void DataLoaderEventL(TDataLoaderEvent aMessage, TInt aError) = 0;
1.167 + };
1.168 +
1.169 +#endif //__ANIMATIONMIXINS_H__