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