uiacceltk/hitchcock/coretoolkit/inc/HuiFxEffect.h
changeset 19 f5bac0badc7e
parent 13 8f67d927ea57
child 21 6ce30188c5bf
equal deleted inserted replaced
14:83d2d132aa58 19:f5bac0badc7e
    38 const TInt KHuiFxEffectDisableMarginsFlag = 0x2;
    38 const TInt KHuiFxEffectDisableMarginsFlag = 0x2;
    39 
    39 
    40 /** Effect is not applied to children visuals. */
    40 /** Effect is not applied to children visuals. */
    41 const TInt KHuiFxEffectExcludeChildrenFlag = 0x4;
    41 const TInt KHuiFxEffectExcludeChildrenFlag = 0x4;
    42 
    42 
    43 /** Effect is grouped and syncronized with other effect(s)*/
    43 /** Effect is grouped and syncronized with other effect(s)
       
    44  * 
       
    45  *  Indicates that the EndGroup event has not yet been received.
       
    46  */
    44 const TInt KHuiFxWaitGroupSyncronization = 0x8;
    47 const TInt KHuiFxWaitGroupSyncronization = 0x8;
    45 
    48 
    46 /** Effect duration is started after it has first time been drawn. */
    49 /** Effect duration is started after it has first time been drawn. */
    47 const TInt KHuiFxDelayRunUntilFirstFrameHasBeenDrawn = 0x10;
    50 const TInt KHuiFxDelayRunUntilFirstFrameHasBeenDrawn = 0x10;
    48 
    51 
    58 /** Background pixels are read for every layer. This is used for fading legacy ALF content only. */
    61 /** Background pixels are read for every layer. This is used for fading legacy ALF content only. */
    59 const TInt KHuiFxEnableBackgroundInAllLayers = 0x100;
    62 const TInt KHuiFxEnableBackgroundInAllLayers = 0x100;
    60 
    63 
    61 /** Background pixels are not read for every frame (only once in a while), thus background content looks frozen if it is visible. */
    64 /** Background pixels are not read for every frame (only once in a while), thus background content looks frozen if it is visible. */
    62 const TInt KHuiFxFrozenBackground = 0x200;
    65 const TInt KHuiFxFrozenBackground = 0x200;
       
    66 
       
    67 /** 
       
    68  * EndGroup request has been received, but this effect has not yet drawn itself.
       
    69  */
       
    70 const TInt KHuiFxWaitGroupToStartSyncronized = 0x400;
       
    71 
       
    72 /** EndGroup request has been received and this effect has drawn itself once and it is
       
    73  *  now waiting for the others in the group to be drawn.
       
    74  */
       
    75 const TInt KHuiFxReadyAndWaitingGroupToStartSyncronized = 0x800;
    63 
    76 
    64 class MAlfGfxEffectObserver
    77 class MAlfGfxEffectObserver
    65     {
    78     {
    66     public:
    79     public:
    67     	/**
    80     	/**
    96     IMPORT_C void SetVisual( CHuiVisual *aVisual );
   109     IMPORT_C void SetVisual( CHuiVisual *aVisual );
    97     IMPORT_C void SetVisual( MHuiEffectable *aVisual );
   110     IMPORT_C void SetVisual( MHuiEffectable *aVisual );
    98     IMPORT_C void SetEngine( CHuiFxEngine *aEngine );
   111     IMPORT_C void SetEngine( CHuiFxEngine *aEngine );
    99 
   112 
   100     IMPORT_C void SetEffectFlags( TInt aFlags );
   113     IMPORT_C void SetEffectFlags( TInt aFlags );
       
   114     void SetEffectFlag( TInt aFlag );
       
   115     void ClearEffectFlag( TInt aFlag );
       
   116     
   101     IMPORT_C void SetEffectGroup(TInt aGroupId);
   117     IMPORT_C void SetEffectGroup(TInt aGroupId);
   102     IMPORT_C TInt EffectFlags();
   118     IMPORT_C TInt EffectFlags();
   103     IMPORT_C TInt GroupId();
   119     IMPORT_C TInt GroupId();
   104 
   120 
   105     // Effect cached render target methods    
   121     // Effect cached render target methods    
   135      */
   151      */
   136     TBool CachedDraw(CHuiGc& aGc, const TRect& aDisplayRect, TBool aRefreshCachedRenderTarget, TBool aOpaque, const TRegion& aClipRegion, TInt aAlpha = 255);
   152     TBool CachedDraw(CHuiGc& aGc, const TRect& aDisplayRect, TBool aRefreshCachedRenderTarget, TBool aOpaque, const TRegion& aClipRegion, TInt aAlpha = 255);
   137     TBool CachedDraw(CHuiGc& aGc, const TRect& aDisplayRect, TBool aRefreshCachedRenderTarget, TBool aOpaque);
   153     TBool CachedDraw(CHuiGc& aGc, const TRect& aDisplayRect, TBool aRefreshCachedRenderTarget, TBool aOpaque);
   138 
   154 
   139     void FxmlVisualInputs(RArray<THuiFxVisualSrcType> &aArray);
   155     void FxmlVisualInputs(RArray<THuiFxVisualSrcType> &aArray);
       
   156     
       
   157 	TBool FxmlUsesOpaqueHint() const;
       
   158 	
       
   159     TInt Handle() const
       
   160         {
       
   161         return iHandle;    
       
   162         }
   140 private:
   163 private:
   141 
   164 
   142     TBool IsAppliedToBackground();
   165     TBool IsAppliedToBackground();
   143     TBool IsFiltered() const;
   166     TBool IsFiltered() const;
   144     
   167     
   165     // Used for syncronizing effect start of effects with same group id. 
   188     // Used for syncronizing effect start of effects with same group id. 
   166     // See also KHuiFxWaitGroupSyncronization
   189     // See also KHuiFxWaitGroupSyncronization
   167     TInt iGroupId;
   190     TInt iGroupId;
   168 	
   191 	
   169     TInt iFramesDrawn;
   192     TInt iFramesDrawn;
       
   193     TReal32 iElapsedTime;
       
   194     TBool iNotifiedEffectReady;
   170     };
   195     };
   171 
   196 
   172 #endif /*HUIFXEFFECT_H_*/
   197 #endif /*HUIFXEFFECT_H_*/