windowing/windowserver/inc/Graphics/openwfc/WSGRAPHICDRAWERINTERFACE.H
branchRCL_3
changeset 4 15986eb6c500
parent 0 5d03bc08d59c
child 17 e375a7921169
equal deleted inserted replaced
3:ac96196b945c 4:15986eb6c500
    38 class MWsScreenRedrawObserver;
    38 class MWsScreenRedrawObserver;
    39 class MWsMemoryRelease;
    39 class MWsMemoryRelease;
    40 class MEventHandler;
    40 class MEventHandler;
    41 class MWsElement;
    41 class MWsElement;
    42 class MWsGraphicsContext;
    42 class MWsGraphicsContext;
       
    43 class MWsAnimationScheduler;
    43 
    44 
    44 /** 
    45 /** 
    45 @publishedPartner
    46 @publishedPartner
    46 @released
    47 @released
    47 */
    48 */
   130 		
   131 		
   131 		WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
   132 		WARNING: Function for internal use ONLY. Compatibility is not guaranteed in future releases.
   132 
   133 
   133 		@released */
   134 		@released */
   134 	virtual TBool RedrawInvalid(const TArray<TGraphicDrawerId>& aInvalid) = 0;
   135 	virtual TBool RedrawInvalid(const TArray<TGraphicDrawerId>& aInvalid) = 0;
   135 	};
       
   136 
       
   137 class MWsAnimationScheduler: public MWsObjectProvider
       
   138 /** A system mechanism for customising the animation timer to a particular hardware variant or to a
       
   139 	particular external compositor e.g. an out-of-scene transition engine.
       
   140 	The default animation scheduler in WSERV does not understand device-dependant parameters e.g.
       
   141 	screen refresh rates
       
   142 	@publishedPartner
       
   143 	@released
       
   144 	to be adapted when WSERV migrates to surfaces
       
   145 */	{
       
   146 public:
       
   147 	/** Called to schedule an animation event for a screen to occur not before some point
       
   148 	A screen may be scheduled to animate several times without actually receiving an animation event from the scheduler
       
   149 	If the scheduler cannot honour the request e.g. device constraints, it ignores the request.
       
   150 	@param aScreen the screen to recieve the event
       
   151 	@param aWhen the point in time the event need not occur before
       
   152 	*/
       
   153 	virtual void ScheduleAnimation(MWsScreen& aScreen,const TTime& aWhen) = 0;
       
   154 	/** Called if a screen determines that it no longer needs to schedule any animation
       
   155 	@param aScreen the screen not needing to receive any animation events
       
   156 	*/
       
   157 	virtual void UnscheduleAnimation(MWsScreen& aScreen) = 0;
       
   158 	/** Called to schedule the redrawing of all screens containing this graphic.
       
   159 	The redrawing of affected screens can be deferred by the scheduler.
       
   160 	@param aId the ID of the graphic to be redrawn.  The graphic itself need not exist
       
   161 		(e.g. it has just been deleted, hence the need to redraw all potentially affected screens). */
       
   162 	virtual void Invalidate(const TGraphicDrawerId& aId) = 0;
       
   163 	/** Called when the Window Server receives a TRawEvent::EInactive  event, to signal power-saving */
       
   164 	virtual void OnInactive() = 0;
       
   165 	/** Called when the Window Server receives a TRawEvent::EActive event, to signal screen back on */
       
   166 	virtual void OnActive() = 0;
       
   167 
       
   168 	/** Called to schedule a redraw for a screen which is out of date
       
   169 	A screen may be scheduled to redraw several times without actually receiving aredraw event from the scheduler
       
   170 	If this request is ignored then the screen will be draw incorrectly untill a such a request is not ignored.
       
   171 	@param aScreen the screen to recieve the event
       
   172 	@param aWhen the point in time the event need not occur before
       
   173 	*/
       
   174 	virtual void ScheduleRedraw(MWsScreen& aScreen,const TTime& aWhen) = 0;
       
   175 	/** Called to force a previously scheduled redraw for a screen to happen synchronously
       
   176 	Used when we are about to loose our ability to perform the redraw correctly.
       
   177 	@param aScreen the screen to recieve the event
       
   178 	*/
       
   179 	virtual void DoRedrawNow(MWsScreen& aScreen) = 0;
       
   180 
       
   181 protected:
       
   182 	IMPORT_C void Animate(MWsScreen& aScreen);
       
   183 	IMPORT_C void Animate(MWsScreen& aScreen, TRequestStatus* aFinished);
       
   184 	IMPORT_C void Redraw(MWsScreen& aScreen);
       
   185 	IMPORT_C TBool RedrawInvalid(MWsScreen& aScreen,const TArray<TGraphicDrawerId>& aInvalid);
       
   186 	};
   136 	};
   187 
   137 
   188 /**
   138 /**
   189 @publishedPartner
   139 @publishedPartner
   190 @prototype
   140 @prototype
   243 	@return the screen, or NULL if aIndex is out of bounds */
   193 	@return the screen, or NULL if aIndex is out of bounds */
   244 	virtual MWsScreen* Screen(TInt aIndex) = 0;
   194 	virtual MWsScreen* Screen(TInt aIndex) = 0;
   245 	/** Get a particular screen by ordinal
   195 	/** Get a particular screen by ordinal
   246 	@return the screen, or NULL if aIndex is out of bounds */
   196 	@return the screen, or NULL if aIndex is out of bounds */
   247 	virtual const MWsScreen* Screen(TInt aIndex) const = 0;
   197 	virtual const MWsScreen* Screen(TInt aIndex) const = 0;
   248 	/** Set the animation scheduler; this can only be done once by custom code
   198 	/**  Not supported
   249 	@return success of overriding the default scheduler */
   199 	@return success of overriding the default scheduler */
   250 	virtual TBool SetCustomAnimationScheduler(MWsAnimationScheduler* aScheduler) = 0;
   200 	virtual TBool SetCustomAnimationScheduler(MWsAnimationScheduler* aScheduler) = 0;
   251 	/** Query whether a custom animation scheduler has been set
   201 	/** Query whether a custom animation scheduler has been set
   252 	@return ETrue if the custom animation scheduler has been set */
   202 	@return ETrue if the custom animation scheduler has been set */
   253 	virtual TBool HasCustomAnimationScheduler() const = 0;
   203 	virtual TBool HasCustomAnimationScheduler() const = 0;