--- a/windowing/windowserver/nga/CLIENT/RWS.CPP Tue Feb 02 01:47:50 2010 +0200
+++ b/windowing/windowserver/nga/CLIENT/RWS.CPP Fri Apr 16 16:21:04 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1995-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -21,6 +21,7 @@
#include <w32std.h>
#include "CLIENT.H"
#include "graphics/windowserverconstants.h"
+#include "rtfxeffect.h"
const TInt KMaxWSERVMessagesSlot=-1;
@@ -2044,7 +2045,7 @@
WriteInt(aRemove,EWsClOpRemoveKeyCode);
}
-EXPORT_C void RWsSession::SimulateXyInputType(TXYInputType aInputType)
+EXPORT_C void RWsSession::SimulateXyInputType(TInt aInputType)
{
WriteInt(aInputType,EWsClOpSimulateXyInput);
}
@@ -2476,6 +2477,91 @@
activity triggered by calls to RWindowBase::Size()
@leave KErrNoMemory Could not allocate the required memory.
@internalAll */
- {
- iBuffer->EnableWindowSizeCacheL();
- }
+ {
+ iBuffer->EnableWindowSizeCacheL();
+ }
+
+EXPORT_C void RWsSession::SendEffectCommand(TInt aTfxCmd,const TDesC8& aTfxCmdData)
+/**
+ Set the WServ session specific effect data or execute commands
+ to TFX Render Stage. The data or command passed by the client
+ API will be directed to MWsTfxApplication::SendEffectCommand.
+ TFX Render Stage will accept only TFX application specific commands and data.
+@param aTfxCmd TFX Render Stage command.
+@param aTfxCmdData Structure related to the specified value of aTfxCmd, the default value is KNullDesC8.
+@publishedPartner
+*/
+ {
+ __ASSERT_ALWAYS(aTfxCmdData.Length()<=KMaxWservStringSize, Panic(EW32PanicStringTooLong));
+ TWsClCmdSendEffectCommand params(aTfxCmd,aTfxCmdData.Size(), NULL);
+ Write(¶ms,sizeof(params),aTfxCmdData.Ptr(),aTfxCmdData.Size(),EWsClOpSendEffectCommand);
+ }
+
+EXPORT_C void RWsSession::RegisterEffect(TInt aAction, const TFileName& aResourceDir, const TFileName& aFilenamePhase1, const TFileName& aFilenamePhase2, TUint aAppUid)
+/**
+Sets a specific animation for a particular transition effect.
+
+Transition effect is represented by one of the values of enum TTfxTransitionActions.
+
+An animation is specified by a filename and directory; the file will contain a description of the animation
+for that transition. In fact each transition can have two animations associated with it, for example
+an App shut down could have one animation with the old application disappearing and then another animation
+for the App Launcher (or home screen) appearing. In this API these are referred to as “Phase1” and “Phase2”.
+
+Animation can be applied to all App's Transition effect or to a specfic App by providing its AppUid.
+
+@param aAction Particular transition to register the animation for.
+@param aResourceDir The name of the directory that contains the animation description files.
+@param aFilenamePhase1 The file containing the description of the animation for the first phase(Phase1) of the transition.
+ Specify KNullDesC for no Phase1 effect.
+@param aFilenamePhase2 The file containing the description of the animation for the second phase(Phase2) of the transition.
+ Specify KNullDesC for no Phase2 effect.
+@param aAppUid The Application UID this effect applies to. Set to zero to specify that all apps will use default effect.
+
+@publishedPartner
+*/
+ {
+ RTFXEffect tfxEffect(iWsHandle, iBuffer);
+ tfxEffect.RegisterTFXEffect(aAction, aResourceDir, aFilenamePhase1, aFilenamePhase2, aAppUid);
+ }
+
+EXPORT_C void RWsSession::UnregisterEffect(TInt aAction)
+/**
+Unregister already set animation for a particular transition effect.
+
+@param aAction Particular transition to unregister the animation for.
+@publishedPartner
+*/
+ {
+ WriteInt(aAction, EWsClOpUnregisterTFXEffect);
+ }
+
+EXPORT_C void RWsSession::UnregisterAllEffects()
+/**
+Unregister animation for all transition effects.
+
+@publishedPartner
+*/
+ {
+ Write(EWsClOpUnregisterAllTFXEffect);
+ }
+
+EXPORT_C void RWsSession::OverrideEffects(TBool aOneShot, TInt aAction, const TFileName& aResourceDir, const TFileName& aFilenamePhase1, const TFileName& aFilenamePhase2)
+/**
+Overides the default animation for given app's transition effect by sent animation description.
+Please refer RWsSession::RegisterEffect() comments for more information on animation description.
+
+@param aOneShot A flag to see if the specified override should be applied once or on an ongoing basis
+@param aAction The particular transition to set the animation for.
+@param aResourceDir The name of the directory that contains the animation description files.
+@param aFilenamePhase1 The file containing the description of the animation for the first phase(Phase1) of the transition.
+ Specify KNullDesC for no Phase1 effect.
+@param aFilenamePhase2 The file containing the description of the animation for the second phase(Phase2) of the transition.
+ Specify KNullDesC for no Phase2 effect.
+
+@publishedPartner
+*/
+ {
+ RTFXEffect tfxEffect(iWsHandle, iBuffer);
+ tfxEffect.OverrideTFXEffect(aOneShot, aAction, aResourceDir, aFilenamePhase1, aFilenamePhase2, RTFXEffect::ETFXSession);
+ }