windowing/windowserver/nga/CLIENT/RWINDOW.CPP
changeset 36 01a6848ebfd7
parent 0 5d03bc08d59c
child 45 36b2e23a8629
equal deleted inserted replaced
0:5d03bc08d59c 36:01a6848ebfd7
    18 #include <e32std.h>
    18 #include <e32std.h>
    19 #include "../SERVER/w32cmd.h"
    19 #include "../SERVER/w32cmd.h"
    20 #include "CLIENT.H"
    20 #include "CLIENT.H"
    21 #include "w32comm.h"
    21 #include "w32comm.h"
    22 #include <graphics/surface.h>
    22 #include <graphics/surface.h>
       
    23 #include "rtfxeffect.h"
    23 
    24 
    24 RWindowTreeNode::RWindowTreeNode()
    25 RWindowTreeNode::RWindowTreeNode()
    25 /** Protected default constructor.
    26 /** Protected default constructor.
    26 
    27 
    27 This creates a sessionless, uninitialised window tree node handle. This class 
    28 This creates a sessionless, uninitialised window tree node handle. This class 
  1857 	
  1858 	
  1858 	argb.SetInternal(WriteReply(EWsWinOpKeyColor));
  1859 	argb.SetInternal(WriteReply(EWsWinOpKeyColor));
  1859 	return argb;
  1860 	return argb;
  1860 	}
  1861 	}
  1861 
  1862 
  1862 // RDrawableWindow //
  1863 EXPORT_C void RWindowBase::SetPurpose(TInt aPurpose)
       
  1864 /** 
       
  1865 Sets specific window  purpose to the TFX layer. The purpose passed 
       
  1866 by the client API will be directed to MWsTfxLayer::SetPurpose. 
       
  1867 @param aPurpose The window purpose information. 
       
  1868 @see MWsTfxLayer
       
  1869 @publishedPartner
       
  1870 @prototype
       
  1871 */
       
  1872 	{
       
  1873 	WriteInt(aPurpose,EWsWinOpSetPurpose);
       
  1874 	}
       
  1875 
       
  1876 EXPORT_C void RWindowBase::SendEffectCommand(TInt aTfxCmd,const TDesC8& aTfxCmdData)
       
  1877 /** 
       
  1878 Sets specific effect data or execute commands to the TFX layer.
       
  1879 The data or command passed by the client API will be directed to MWsTfxLayer::SendEffectCommand.
       
  1880 MWsTfxLayer will accept only window specific commands and data.
       
  1881 @param aTfxCmd TFX layer command.
       
  1882 @param aTfxCmdData Data structure related to the specified value of aTfxCmd. The default value is KNullDesC8.
       
  1883 @publishedPartner
       
  1884 */
       
  1885     {
       
  1886     __ASSERT_ALWAYS(aTfxCmdData.Length()<=KMaxWservStringSize, Panic(EW32PanicStringTooLong));
       
  1887     TWsClCmdSendEffectCommand params(aTfxCmd,aTfxCmdData.Size(),this->iWsHandle);
       
  1888     Write(&params,sizeof(params),aTfxCmdData.Ptr(),aTfxCmdData.Size(),EWsWinOpSendEffectCommand);
       
  1889     }
       
  1890 
       
  1891 EXPORT_C void RWindowBase::OverrideEffects(TBool aOneShot, TInt aAction, const TFileName& aResourceDir, const TFileName& aFilenamePhase1, const TFileName& aFilenamePhase2)
       
  1892 /**
       
  1893 Overides the default animation for current window's transition effect by sent animation description.
       
  1894 Please refer RWsSession::RegisterEffect() comments for more information on animation description.
       
  1895 
       
  1896 @param aOneShot A flag to see if the specified override should be applied once or on an ongoing basis
       
  1897 @param aAction The particular transition to set the animation for.
       
  1898 @param aResourceDir The name of the directory that contains the animation description files.
       
  1899 @param aFilenamePhase1 The file containing the description of the animation for the first phase(Phase1) of the transition.
       
  1900 					   Specify KNullDesC for no Phase1 effect.
       
  1901 @param aFilenamePhase2 The file containing the description of the animation for the second phase(Phase2) of the transition.
       
  1902 					   Specify KNullDesC for no Phase2 effect.
       
  1903 
       
  1904 @publishedPartner
       
  1905 */
       
  1906 	{
       
  1907 	RTFXEffect tfxEffect(iWsHandle, iBuffer);
       
  1908 	tfxEffect.OverrideTFXEffect(aOneShot, aAction, aResourceDir, aFilenamePhase1, aFilenamePhase2, RTFXEffect::ETFXWindow);
       
  1909 	}
       
  1910 //////////////////////////// RDrawableWindow ////////////////////////////////
  1863 
  1911 
  1864 void RDrawableWindow::doScroll(const TRect &aClipRect, const TPoint &aOffset, const TRect &aRect, TInt aOpcode)
  1912 void RDrawableWindow::doScroll(const TRect &aClipRect, const TPoint &aOffset, const TRect &aRect, TInt aOpcode)
  1865 	{
  1913 	{
  1866 	TWsWinCmdScroll scroll(aClipRect,aOffset,aRect);
  1914 	TWsWinCmdScroll scroll(aClipRect,aOffset,aRect);
  1867 	Write(&scroll,sizeof(scroll),aOpcode);
  1915 	Write(&scroll,sizeof(scroll),aOpcode);