lafagnosticuifoundation/graphicseffects/Adapter/inc/GfxTransAdapter.h
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 // Copyright (c) 2006-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 #ifndef _GFXTRANSADAPTERADAPTER_H_
       
    17 #define _GFXTRANSADAPTERADAPTER_H_
       
    18 
       
    19 #include <gfxtranseffect/gfxtransclient.h>
       
    20 
       
    21 //class CTransitionControl;
       
    22 
       
    23 /**
       
    24 This is the abstract interface of a transition adapter.
       
    25 The transition engine vendor implements this interface to serve transitions.
       
    26 The implementation is a static interface dll with two exports,
       
    27 at ordinal 1, MGfxTransAdapter::CreateL() to create an adapter adapter and
       
    28 at ordinal 2, MGfxTransAdapter::Destroy() to destroy it.
       
    29  
       
    30 @publishedPartner
       
    31 @released
       
    32 */
       
    33 class MGfxTransAdapter 
       
    34 	{
       
    35 public: //DLL Interface
       
    36 	IMPORT_C static MGfxTransAdapter* CreateL(MGfxTransClient* aProvider);
       
    37 	IMPORT_C static void Destroy(MGfxTransAdapter* aAdapter);
       
    38 public: //Adapter Interface.
       
    39 	enum TClientState 
       
    40 		{
       
    41 		EPreBeginCapture,
       
    42 		EPostBeginCapture,
       
    43 		EPreEndCapture,
       
    44 		EPostEndCapture,
       
    45 		EAbort,
       
    46 		EGlobalAbort, 
       
    47 		EBeginGroup,
       
    48 		EEndGroup,
       
    49 		EFallback,
       
    50 		};
       
    51 	/**
       
    52 	 Handles a specific client state.
       
    53 	 @param aState a client state to handle
       
    54 	 @param aKey the registered control, NULL if not valid
       
    55 	 @param aHandle handle to the transition in progress, 0 if not valid.
       
    56 	 */
       
    57 	virtual TInt HandleClientState(TClientState aState, const CCoeControl* aKey, TInt aHandle) = 0; 
       
    58 
       
    59 	/**
       
    60 	Handles an update to a transition participant during transition animation.
       
    61 	Is called by the client if new draw commands arrive after End, but before MGfxTransClient::TransitionFinished() 
       
    62 	has been called.	
       
    63 	@param aHandle handle to the transition.
       
    64 	@param aParticipantId the id of the participant that was updated.
       
    65 	@param aDrawRect
       
    66 	@param aBoundingRect
       
    67 	*/
       
    68 	virtual void HandleParticpantUpdate(TInt aHandle, const CParticipantData* aParticipant, RWsGraphicMsgBuf* aCommandBuffer, const TRect& aDrawRect, const TRect& aBoundingRect) = 0;
       
    69 
       
    70 	/**
       
    71 	
       
    72 	 @return ETrue if the adapter is ready to serve transitions.
       
    73 	 */
       
    74 	virtual TBool IsActive() = 0;
       
    75 
       
    76 	/**
       
    77 	 Returns the current set of transition policies.
       
    78 	 The engine might choose to return NULL and push all policies through MGfxTransClient::TransitionPolicyUpdate()
       
    79 	 @param aCount on return, contains the number of policies returned.
       
    80 	 @return an array of TControlPolicy pointers. caller takes responsibility for cleanup.
       
    81 	 */
       
    82 	virtual TControlPolicy* GetTransitionPolicies(TInt &aCount) = 0;
       
    83 	
       
    84 	/**
       
    85 	A notify of external state change.
       
    86 	Same as the API function, is passed straight from the client.
       
    87 	@param aState the user supplied state
       
    88 	@param aArg optional arguments or NULL if not used.
       
    89 	*/
       
    90 	virtual void NotifyExternalState(TInt aState, const TDesC8* aArg) = 0;
       
    91 	
       
    92 	/**
       
    93 	 Requests a transition finished event. 
       
    94 	 This MUST result in a later call to MGfxTransClient::TransitionFinished(). 
       
    95 	 It can be called immediatly if adapter does not need to handle this.
       
    96 	 */
       
    97 	virtual void StartTransition(TInt aHandle) = 0;
       
    98 	
       
    99 	/**
       
   100 	 Tells the engine to start a full screen effect.
       
   101 	 @param aAction Effect identifier
       
   102 	 @param aEffectArea the part of the framebuffer to be affected
       
   103 	 */
       
   104 	virtual void BeginFullScreen(TUint aAction, const TRect &aEffectArea) = 0;
       
   105 	/**
       
   106 	 Tells the engine to start a full screen effect.
       
   107 	 @param aAction Effect identifier
       
   108 	 @param aEffectArea the part of the framebuffer to be affected
       
   109 	 @param aType the type of the parameters.
       
   110 	 @param aParam the parameters.
       
   111 	*/
       
   112 	virtual void BeginFullScreen(TUint aAction, const TRect &aEffectArea, TUint aType, const TDesC8& aParams) = 0;
       
   113 	
       
   114 	/**
       
   115 	Informs the engine of the endpoint of a fullscreen effect.
       
   116 	*/
       
   117 	virtual void EndFullScreen() = 0;
       
   118 	
       
   119 	/**
       
   120 	Tells the engine to abort a fullscreen effect.
       
   121 	*/
       
   122 	virtual void AbortFullScreen() = 0;
       
   123 	};
       
   124 	
       
   125 
       
   126 #endif
       
   127