lafagnosticuifoundation/graphicseffects/test/src/t_gfxtransadapterstub.cpp
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 // Copyright (c) 2007-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 #include <gfxtranseffect/gfxtranseffect.h>
       
    23 #include <gfxtranseffect/gfxtransdatatype.h>
       
    24 
       
    25 #include "t_gfxtransadapterstub.h"
       
    26 
       
    27 //
       
    28 // DLL interface.
       
    29 //
       
    30 EXPORT_C MGfxTransAdapter* MGfxTransAdapter::CreateL(MGfxTransClient* aClient)
       
    31 	{
       
    32 	CGfxTransAdapterStub* adapter = new (ELeave) CGfxTransAdapterStub(aClient);
       
    33 	CleanupStack::PushL(adapter);
       
    34 	adapter->ConstructL();
       
    35 	CleanupStack::Pop(adapter);
       
    36 	return adapter;
       
    37 	}
       
    38 
       
    39 EXPORT_C void MGfxTransAdapter::Destroy(MGfxTransAdapter* aAdapter)
       
    40 	{
       
    41 	delete static_cast<CGfxTransAdapterStub*>(aAdapter);
       
    42 	}
       
    43 
       
    44 //
       
    45 // Construction/Destruction
       
    46 //
       
    47 CGfxTransAdapterStub::CGfxTransAdapterStub(MGfxTransClient* aClient) :
       
    48 	iClient(aClient)
       
    49 	{
       
    50 	}
       
    51 	
       
    52 CGfxTransAdapterStub::~CGfxTransAdapterStub()
       
    53 	{
       
    54 	}
       
    55 	
       
    56 void CGfxTransAdapterStub::ConstructL()
       
    57     {
       
    58 	}
       
    59 
       
    60 //
       
    61 // MGfxTransAdapter implementation
       
    62 //
       
    63 TInt CGfxTransAdapterStub::HandleClientState(TClientState /*aState*/, const CCoeControl* /* aKey*/, TInt /*aHandle*/)
       
    64 	{	
       
    65 	return KErrNone;
       
    66 	}
       
    67 	
       
    68 TBool CGfxTransAdapterStub::IsActive()
       
    69 	{
       
    70 	return ETrue;
       
    71 	}
       
    72 	
       
    73 TControlPolicy* CGfxTransAdapterStub::GetTransitionPolicies(TInt&  aCount)
       
    74 	{
       
    75 	//Create a policy
       
    76     aCount = 1; // we need only one policy
       
    77     
       
    78     TControlPolicy* policies = new TControlPolicy[aCount];
       
    79     policies[0].iId.iUid = 0; // control UID
       
    80     policies[0].iAction = GfxTransEffect::ELoseFocus; // action identifier
       
    81     policies[0].iPolicy = ESupported;
       
    82     
       
    83     return policies;
       
    84 	}
       
    85 	
       
    86 void CGfxTransAdapterStub::StartTransition(TInt /* aHandle */)
       
    87 	{
       
    88     // Empty implementation
       
    89     // We don't inform client about finishing transition so we 
       
    90     // could test deregistering while being in transition
       
    91     }
       
    92 
       
    93 void CGfxTransAdapterStub::NotifyExternalState(TInt /*aState*/, const TDesC8* /* aArg */)
       
    94 	{
       
    95 	
       
    96 	}
       
    97 	
       
    98 void CGfxTransAdapterStub::HandleParticpantUpdate(TInt /*aHandle*/, const CParticipantData* /*aParticipant*/, RWsGraphicMsgBuf* /*aCommandBuffer*/, const TRect& /*aDrawRect*/, const TRect& /*aBoundingRect*/)
       
    99 	{
       
   100 
       
   101 	}
       
   102 
       
   103 void CGfxTransAdapterStub::BeginFullScreen(TUint /*aAction*/, const TRect& /*aEffectArea*/)
       
   104 	{
       
   105 	}
       
   106 
       
   107 void CGfxTransAdapterStub::BeginFullScreen(TUint /*aAction*/, const TRect& /*aEffectArea*/, TUint /*aType*/, const TDesC8& /*aParams*/)
       
   108 	{
       
   109 	}
       
   110 
       
   111 void CGfxTransAdapterStub::EndFullScreen()
       
   112 	{
       
   113 	}
       
   114 
       
   115 void CGfxTransAdapterStub::AbortFullScreen()
       
   116 	{
       
   117 	}