2487 to TFX Render Stage. The data or command passed by the client |
2489 to TFX Render Stage. The data or command passed by the client |
2488 API will be directed to MWsTfxApplication::SendEffectCommand. |
2490 API will be directed to MWsTfxApplication::SendEffectCommand. |
2489 TFX Render Stage will accept only TFX application specific commands and data. |
2491 TFX Render Stage will accept only TFX application specific commands and data. |
2490 @param aTfxCmd TFX Render Stage command. |
2492 @param aTfxCmd TFX Render Stage command. |
2491 @param aTfxCmdData Structure related to the specified value of aTfxCmd, the default value is KNullDesC8. |
2493 @param aTfxCmdData Structure related to the specified value of aTfxCmd, the default value is KNullDesC8. |
|
2494 |
|
2495 @capability WriteDeviceData Only if aTfxCmd has value ETfxCmdEnableAllTransitions or ETfxCmdDisableAllTransitions |
|
2496 |
2492 @publishedPartner |
2497 @publishedPartner |
2493 */ |
2498 */ |
2494 { |
2499 { |
2495 __ASSERT_ALWAYS(aTfxCmdData.Length()<=KMaxWservStringSize, Panic(EW32PanicStringTooLong)); |
2500 __ASSERT_ALWAYS(aTfxCmdData.Length()<=KMaxWservStringSize, Panic(EW32PanicStringTooLong)); |
2496 TWsClCmdSendEffectCommand params(aTfxCmd,aTfxCmdData.Size(), NULL); |
2501 TWsClCmdSendEffectCommand params(aTfxCmd,aTfxCmdData.Size(), NULL); |
2497 Write(¶ms,sizeof(params),aTfxCmdData.Ptr(),aTfxCmdData.Size(),EWsClOpSendEffectCommand); |
2502 Write(¶ms,sizeof(params),aTfxCmdData.Ptr(),aTfxCmdData.Size(),EWsClOpSendEffectCommand); |
2498 } |
2503 } |
2499 |
2504 |
2500 EXPORT_C void RWsSession::RegisterEffect(TInt aAction, const TFileName& aResourceDir, const TFileName& aFilenamePhase1, const TFileName& aFilenamePhase2, TUint aAppUid) |
2505 EXPORT_C void RWsSession::RegisterEffect(TInt aAction, TInt aPurpose, const TFileName& aResourceDir, const TFileName& aFilenameOutgoing, const TFileName& aFilenameIncoming, TUint aAppUid, TBitFlags aFlags) |
2501 /** |
2506 /** |
2502 Sets a specific animation for a particular transition effect. |
2507 Sets a specific animation for a particular transition effect. |
2503 |
2508 |
2504 Transition effect is represented by one of the values of enum TTfxTransitionActions. |
2509 Transition effect is represented by one of the values of enum TTfxTransitionActions. |
2505 |
2510 |
2506 An animation is specified by a filename and directory; the file will contain a description of the animation |
2511 An animation is specified by a filename and directory; the file will contain a description of the animation |
2507 for that transition. In fact each transition can have two animations associated with it, for example |
2512 for that transition. In fact each transition can have two animations associated with it, for example |
2508 an App shut down could have one animation with the old application disappearing and then another animation |
2513 an App shut down could have one animation with the old application disappearing and then another animation |
2509 for the App Launcher (or home screen) appearing. In this API these are referred to as “Phase1” and “Phase2”. |
2514 for the App Launcher (or home screen) appearing. |
2510 |
2515 |
2511 Animation can be applied to all App's Transition effect or to a specfic App by providing its AppUid. |
2516 Animation can be applied to all App's Transition effect or to a specfic App by providing its AppUid. |
2512 |
2517 |
2513 @param aAction Particular transition to register the animation for. |
2518 @param aAction Particular transition to register the animation for. |
|
2519 @param aPurpose The purpose of the window. |
2514 @param aResourceDir The name of the directory that contains the animation description files. |
2520 @param aResourceDir The name of the directory that contains the animation description files. |
2515 @param aFilenamePhase1 The file containing the description of the animation for the first phase(Phase1) of the transition. |
2521 @param aFilenameOutgoing The file containing the description of the animation for the outgoing phase of the transition. |
2516 Specify KNullDesC for no Phase1 effect. |
2522 Specify KNullDesC for no outgoing phase effect. |
2517 @param aFilenamePhase2 The file containing the description of the animation for the second phase(Phase2) of the transition. |
2523 @param aFilenameIncoming The file containing the description of the animation for the incoming phase of the transition. |
2518 Specify KNullDesC for no Phase2 effect. |
2524 Specify KNullDesC for no incoming phase effect. |
2519 @param aAppUid The Application UID this effect applies to. Set to zero to specify that all apps will use default effect. |
2525 @param aAppUid The Application UID this effect applies to. Set to zero to specify that all apps will use default effect. |
|
2526 @param aFlags Flag for the effect. Please see TTfxFlags for values this flag parameter can use. |
|
2527 |
|
2528 @capability WriteDeviceData This API does nothing if the client does not possess required Capability |
2520 |
2529 |
2521 @publishedPartner |
2530 @publishedPartner |
2522 */ |
2531 */ |
2523 { |
2532 { |
2524 RTFXEffect tfxEffect(iWsHandle, iBuffer); |
2533 RTFXEffect tfxEffect(iWsHandle, iBuffer); |
2525 tfxEffect.RegisterTFXEffect(aAction, aResourceDir, aFilenamePhase1, aFilenamePhase2, aAppUid); |
2534 tfxEffect.RegisterTFXEffect(aAction, aPurpose, aResourceDir, aFilenameOutgoing, aFilenameIncoming, aAppUid, aFlags); |
2526 } |
2535 } |
2527 |
2536 |
2528 EXPORT_C void RWsSession::UnregisterEffect(TInt aAction) |
2537 EXPORT_C void RWsSession::UnregisterEffect(TInt aAction, TInt aPurpose, TUint aAppUid) |
2529 /** |
2538 /** |
2530 Unregister already set animation for a particular transition effect. |
2539 Unregister already set animation for a particular transition effect |
2531 |
2540 |
2532 @param aAction Particular transition to unregister the animation for. |
2541 @param aAction Particular transition to unregister the animation for. |
|
2542 @param aPurpose The purpose of the window. |
|
2543 @param aAppUid The Application UID this effect applies to. Set to 0 to specify the default effect will be unregistered. |
|
2544 |
|
2545 @capability WriteDeviceData This API does nothing if the client does not possess required Capability |
|
2546 |
2533 @publishedPartner |
2547 @publishedPartner |
2534 */ |
2548 */ |
2535 { |
2549 { |
2536 WriteInt(aAction, EWsClOpUnregisterTFXEffect); |
2550 TWsClCmdUnRegisterEffect unregisterEffect(aAction, aPurpose, aAppUid); |
|
2551 Write(&unregisterEffect, sizeof(unregisterEffect), EWsClOpUnregisterTFXEffect); |
2537 } |
2552 } |
2538 |
2553 |
2539 EXPORT_C void RWsSession::UnregisterAllEffects() |
2554 EXPORT_C void RWsSession::UnregisterAllEffects() |
2540 /** |
2555 /** |
2541 Unregister animation for all transition effects. |
2556 Unregister animation for all transition effects. |
2542 |
2557 |
|
2558 @capability WriteDeviceData This API does nothing if the client does not possess required Capability |
|
2559 |
2543 @publishedPartner |
2560 @publishedPartner |
2544 */ |
2561 */ |
2545 { |
2562 { |
2546 Write(EWsClOpUnregisterAllTFXEffect); |
2563 Write(EWsClOpUnregisterAllTFXEffect); |
2547 } |
2564 } |
2548 |
2565 |
2549 EXPORT_C void RWsSession::OverrideEffects(TBool aOneShot, TInt aAction, const TFileName& aResourceDir, const TFileName& aFilenamePhase1, const TFileName& aFilenamePhase2) |
2566 EXPORT_C void RWsSession::OverrideEffects(TInt aAction, TInt aPurpose, const TFileName& aResourceDir, const TFileName& aFilenameOutgoing, const TFileName& aFilenameIncoming, TBitFlags aFlags) |
2550 /** |
2567 /** |
2551 Overides the default animation for given app's transition effect by sent animation description. |
2568 Overides the default animation for given app's transition effect by sent animation description. |
2552 Please refer RWsSession::RegisterEffect() comments for more information on animation description. |
2569 Please refer RWsSession::RegisterEffect() comments for more information on animation description. |
2553 |
2570 |
2554 @param aOneShot A flag to see if the specified override should be applied once or on an ongoing basis |
|
2555 @param aAction The particular transition to set the animation for. |
2571 @param aAction The particular transition to set the animation for. |
|
2572 @param aPurpose This override only effects the window/layers owned by the application that have the specified purpose. |
2556 @param aResourceDir The name of the directory that contains the animation description files. |
2573 @param aResourceDir The name of the directory that contains the animation description files. |
2557 @param aFilenamePhase1 The file containing the description of the animation for the first phase(Phase1) of the transition. |
2574 @param aFilenameOutgoing The file containing the description of the animation for the outgoing phase of the transition. |
2558 Specify KNullDesC for no Phase1 effect. |
2575 Specify KNullDesC for no outgoing phase effect. |
2559 @param aFilenamePhase2 The file containing the description of the animation for the second phase(Phase2) of the transition. |
2576 @param aFilenameIncoming The file containing the description of the animation for the incoming phase of the transition. |
2560 Specify KNullDesC for no Phase2 effect. |
2577 Specify KNullDesC for no incoming phase effect. |
|
2578 @param aFlags Flag for the effect. Please see TTfxFlags for values this flag parameter can use. |
|
2579 |
|
2580 @capability WriteDeviceData This API does nothing if the client does not possess required Capability |
2561 |
2581 |
2562 @publishedPartner |
2582 @publishedPartner |
2563 */ |
2583 */ |
2564 { |
2584 { |
2565 RTFXEffect tfxEffect(iWsHandle, iBuffer); |
2585 RTFXEffect tfxEffect(iWsHandle, iBuffer); |
2566 tfxEffect.OverrideTFXEffect(aOneShot, aAction, aResourceDir, aFilenamePhase1, aFilenamePhase2, RTFXEffect::ETFXSession); |
2586 tfxEffect.OverrideTFXEffect(RTFXEffect::ETFXSession, aAction, aPurpose, aResourceDir, aFilenameOutgoing, aFilenameIncoming, aFlags); |
2567 } |
2587 } |