os/graphics/graphicstest/uibench/src/tspriteanimdll.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     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,"te_spriteanimdll.dll");
    31 
    32 enum TAnimDllOpcodesSprite
    33 	{
    34 	EADllDraw1,
    35 	EADllDraw2,
    36 	EADllDraw3,
    37 	EADllDrawBlank,
    38 	};
    39 
    40 
    41 enum TAnimType
    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 	//from CSpriteAnim
    66 	void ConstructL(TAny *aArgs);
    67 	
    68 	//from CAnim	
    69 	void Animate(TDateTime *aDateTime);
    70 	void Command(TInt aOpcode, TAny *aArgs);
    71 	TInt CommandReplyL(TInt aOpcode, TAny *aArgs);
    72 
    73 	//from MEventHandler
    74 	TBool OfferRawEvent(const TRawEvent &aRawEvent);
    75 
    76 private:
    77 	void DrawL(TInt aOpcode);
    78 	};	
    79 
    80 #endif