os/graphics/graphicstest/uibench/src/spriteanimdll.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 /**
    17  @file
    18  @test
    19  @internalComponent - Internal Symbian test code 
    20 */
    21 
    22 #ifndef __SPRITEANIMDLL_H__
    23 #define __SPRITEANIMDLL_H__
    24 
    25 
    26 #if !defined(__W32ADLL_H__)
    27 #include <w32adll.h>
    28 #endif
    29 
    30 _LIT(KAnimDLLName,"SPRITEANIMDLL.DLL");
    31 
    32 enum AnimDllOpcodesSprite
    33 	{
    34 	EADllDraw1,
    35 	EADllDraw2,
    36 	EADllDraw3,
    37 	EADllDrawBlank,
    38 	};
    39 
    40 
    41 enum AnimType
    42 	{
    43 	ESpriteAnimType
    44 	};
    45 
    46 class RTAnim : public RAnim
    47 	{
    48 public:
    49 	RTAnim();
    50 	RTAnim(RAnimDll& aDll);
    51  	inline TInt Construct(const RWsSprite &aSprite,TInt aType,const TDesC8 &aParams) {return(RAnim::Construct(aSprite,aType,aParams));}
    52  	inline void Command(TInt aOpcode) {RAnim::Command(aOpcode);}
    53 	};
    54 
    55 class CTAnimDll : public CAnimDll
    56 	{
    57 public:
    58 	CAnim *CreateInstanceL(TInt aType);
    59 private:
    60 	};
    61 
    62 class CTSpriteAnim : public CSpriteAnim
    63 	{
    64 public:
    65 	virtual void ConstructL(TAny *aArgs);
    66 	
    67 //Pure virtual functions from CAnim	
    68 	virtual void Animate(TDateTime *aDateTime);
    69 	virtual void Command(TInt aOpcode, TAny *aArgs);
    70 	virtual TInt CommandReplyL(TInt aOpcode, TAny *aArgs);
    71 
    72 //Pure virtual function from MEventHandler
    73 	virtual TBool OfferRawEvent(const TRawEvent &aRawEvent);
    74 private:
    75 	void DrawL(TInt aOpcode);
    76 	};	
    77 
    78 #endif