windowing/windowserver/nga/CLIENT/RWINDOW.CPP
branchRCL_3
changeset 163 bbf46f59e123
parent 26 15986eb6c500
child 164 25ffed67c7ef
--- a/windowing/windowserver/nga/CLIENT/RWINDOW.CPP	Thu Aug 19 11:11:18 2010 +0300
+++ b/windowing/windowserver/nga/CLIENT/RWINDOW.CPP	Tue Aug 31 16:31:06 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 1994-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1994-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"
@@ -20,6 +20,7 @@
 #include "CLIENT.H"
 #include "w32comm.h"
 #include <graphics/surface.h>
+#include "rtfxeffect.h"
 
 RWindowTreeNode::RWindowTreeNode()
 /** Protected default constructor.
@@ -170,12 +171,6 @@
 	         {
 	         DestroyWindowSizeCacheEntry();
 	         }
-#ifdef SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION
-	    if (WindowNativeSizeCacheEnabled())
-	         {
-	         DestroyWindowNativeSizeCacheEntry();
-	         }
-#endif // SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION
         Write(EWsWinOpFree);
 	    }
 	iWsHandle=NULL;
@@ -846,31 +841,15 @@
         }
 	}
 
-EXPORT_C TSize RWindowBase::SizeForEgl() const
-#ifdef SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION
 /**
 @internalAll
 Disclaimer - this API is internal and is subject to change
-@prototype */
-	{
-	TSize size;
-	if (WindowNativeSizeCacheEnabled() && WindowNativeSize(size) == KErrNone)
-		{
-		return size;
-		}
-	else
-		{
-		return Size();
-		}
-	}
-#else
+@deprecated */
+EXPORT_C TSize RWindowBase::SizeForEgl() const
     {
-    // API should not be used if macro undefined.
-    ASSERT(0);
-    return TSize();
+    return Size();
     }
-#endif // SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION
-
+    
 EXPORT_C void RWindowBase::SetPosition(const TPoint &aPos)
 /** Sets the position of a window relative to its parent. 
 
@@ -1384,7 +1363,7 @@
 events from all detected pointers to this window.
 
 This method must be called before the window is activated by calling RWindowBase::Activate().
-Otherwise this will be ignored (release build), or panic (debug build). 
+Otherwise the client is panicked with the code EWservPanicUnableToEnableAdvPointer.
 
 If this method is not called for the window, it is assumed that the window is not
 able to receive events from multiple pointers, and thus only events from a single
@@ -1411,44 +1390,11 @@
 /**
 @internalAll
 Disclaimer - this API is internal and is subject to change
-@prototype */
+@deprecated */
 EXPORT_C TInt RWindowBase::FixNativeOrientation()
-#if !defined(SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION) || defined (SYMBIAN_GRAPHICS_BUILD_OPENWF_WSERV) || defined (__WINS__) 
     {
     return KErrNotSupported;
     }
-#else
-	{
-    TInt err = KErrNone;
-	if (!WindowNativeSizeCacheEnabled())
-		{
-		TRAP(err, EnableWindowNativeSizeCacheL());
-		if (err != KErrNone)
-		    {
-            return err;
-		    }
-		}
-	
-	const CFbsBitGc::TGraphicsOrientation orientation = static_cast<CFbsBitGc::TGraphicsOrientation>(WriteReply(EWsWinOpFixNativeOrientation));
-	switch (orientation)
-		{
-	case CFbsBitGc::EGraphicsOrientationNormal:
-    case CFbsBitGc::EGraphicsOrientationRotated180:
-		err = SetWindowNativeSize(Size());
-        break;
-	case CFbsBitGc::EGraphicsOrientationRotated90 :
-    case CFbsBitGc::EGraphicsOrientationRotated270:
-        {
-	    TSize size = Size();
-	    err = SetWindowNativeSize(TSize(size.iHeight, size.iWidth));
-        }
-		break;
-	default:
-	    Assert(EW32AssertInvalidOrientation);
-		}
-	return err;
-	}
-#endif // SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION
 
 EXPORT_C TInt RWindowBase::AllocPointerMoveBuffer(TInt aMaxNumPoints, TUint aFlags)
 /** Allocates a buffer for storing pointer movements. 
@@ -1932,7 +1878,54 @@
 	return argb;
 	}
 
-// RDrawableWindow //
+EXPORT_C void RWindowBase::SetPurpose(TInt aPurpose)
+/** 
+Sets specific window  purpose to the TFX layer. The purpose passed 
+by the client API will be directed to MWsTfxLayer::SetPurpose. 
+@param aPurpose The window purpose information. 
+@see MWsTfxLayer
+@publishedPartner
+@prototype
+*/
+	{
+	WriteInt(aPurpose,EWsWinOpSetPurpose);
+	}
+
+EXPORT_C void RWindowBase::SendEffectCommand(TInt aTfxCmd,const TDesC8& aTfxCmdData)
+/** 
+Sets specific effect data or execute commands to the TFX layer.
+The data or command passed by the client API will be directed to MWsTfxLayer::SendEffectCommand.
+MWsTfxLayer will accept only window specific commands and data.
+@param aTfxCmd TFX layer command.
+@param aTfxCmdData Data 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(),this->iWsHandle);
+    Write(&params,sizeof(params),aTfxCmdData.Ptr(),aTfxCmdData.Size(),EWsWinOpSendEffectCommand);
+    }
+
+EXPORT_C void RWindowBase::OverrideEffects(TInt aAction, const TFileName& aResourceDir, const TFileName& aFilenameOutgoing, const TFileName& aFilenameIncoming, TBitFlags aFlags)
+/**
+Overides the default animation for current window's transition effect by sent animation description.
+Please refer RWsSession::RegisterEffect() comments for more information on animation description.
+
+@param aAction The particular transition to set the animation for.
+@param aResourceDir The name of the directory that contains the animation description files.
+@param aFilenameOutgoing The file containing the description of the animation for the outgoing phase of the transition. 
+						 Specify KNullDesC for no outgoing phase effect.
+@param aFilenameIncoming The file containing the description of the animation for the incoming phase of the transition. 
+						 Specify KNullDesC for no incoming phase effect.
+@param aFlags Flag for the effect. Please see TTfxFlags for values this flag parameter can use.
+
+@publishedPartner
+*/
+	{
+	RTFXEffect tfxEffect(iWsHandle, iBuffer);
+	tfxEffect.OverrideTFXEffect(RTFXEffect::ETFXWindow, aAction, 0, aResourceDir, aFilenameOutgoing, aFilenameIncoming, aFlags);
+	}
+//////////////////////////// RDrawableWindow ////////////////////////////////
 
 void RDrawableWindow::doScroll(const TRect &aClipRect, const TPoint &aOffset, const TRect &aRect, TInt aOpcode)
 	{
@@ -2805,6 +2798,7 @@
 description above. 
 @param aPriority A priority value - if more than one window group has requested 
 capture for the same key event, the one with the highest priority will capture it.
+The value must be greater than KMinTInt.
 @return A handle identifying the capture key, or one of the system-wide error 
 codes (if <0). KErrPermissionDenied indicates that the requested key cannot be 
 captured by this window group, because it has been protected by another window group. 
@@ -2873,6 +2867,7 @@
 aModifierMask need to be set and which need to be unset. 
 @param aPriority A priority value - if more than one window group has requested 
 capture for the same key event, the one with the highest priority will capture it.
+The value must be greater than KMinTInt.
 @return A handle identifying the capture key, or one of the system-wide error 
 codes (if < 0). KErrPermissionDenied indicates that the requested key cannot be captured by this 
 window group, because it has been protected by another window group. For more information, see 
@@ -2944,6 +2939,7 @@
 not set. Modifier key states are defined in TEventModifier. 
 @param aPriority If more than one window group has requested capture for the 
 same long key event, the one with the highest priority will capture the event.
+The value must be greater than KMinTInt.
 @param aFlags Configures the long key capture behaviour. See the TLongCaptureFlags 
 enum.
 @return Identifying value for the long key capture. For use with the CancelCaptureLongKey() 
@@ -2979,6 +2975,7 @@
 not set. Modifier key states are defined in TEventModifier. 
 @param aPriority If more than one window group has requested capture for the 
 same long key event, the one with the highest priority will capture the event.
+The value must be greater than KMinTInt.
 @param aFlags Configures the long key capture behaviour. See the TLongCaptureFlags 
 enum.
 @return Identifying value for the long key capture. For use with the CancelCaptureLongKey()