Developer

API Reference

IWidget_SetRate()

Brew Release
Brew MP 1.0.2
See Also
IWidget IWidget_SetImageParm
Description
This function is used to set the rate of animation for the frames stored within an image widget's bitmap, thereby controlling the speed of the animation. When an animation sequence is displayed, frames are copied to the display one after the other, with the next frame in the sequence displayed after this specified time has passed. So, for example, with the animation rate set to 150 milliseconds, the second frame will be displayed 150 milliseconds after the first, the third 150 milliseconds after the second, and so forth.
Parameters
  • pif
    []:
    [in] Pointer to the IWidget object.
  • nRate
    []:
    [in] Specifies the number of milliseconds to wait between animation frames.
Interface
Prototype
   int IWidget_SetRate(IWidget *pif, uint16 nRate)
Return
   AEE_SUCCESS - If BREW was able to successfully set the animation rate.
   AEE_EFAILED - If the animation rate could not be set.
Side Effect
IWidget_SetRate() calls IWidget_SetImageParm() to access the IPARM_RATE image attribute. This has the net effect of processing an EVT_WDG_SETPROPERTY event through the widget hierarchy.
Comment
The animation rate defaults to 150 milliseconds. Setting this rate to values less than the default will result in faster animation, while higher rates result in slower animation.
  • Follow