Linux Mac OSX Windows

Implemented by

 gfxIImageContainer interface

 @author Stuart Parmenter <pavlov@netscape.com>
 @version 0.1
 @see "gfx2"
[scriptable, uuid(1a6290e6-8285-4e10-963d-d001f8d327b8)]
interface imgIContainer : nsISupports

Constants

 Animation mode Constants
   0 = normal
   1 = don't animate
   2 = loop once
const short kNormalAnimMode = 0

        
const short kDontAnimMode = 1

        
const short kLoopOnceAnimMode = 2

Attributes


        
attribute unsigned short animationMode
 Get the current frame that would be drawn if the image was to be drawn now
readonly attribute gfxIImageFrame currentFrame
 The height of the container rectangle.
readonly attribute PRInt32 height
 number of times to loop the image.
 @note -1 means forever.
attribute long loopCount

        
readonly attribute unsigned long numFrames

        
readonly attribute gfx_format preferredAlphaChannelFormat
 The width of the container rectangle.
readonly attribute PRInt32 width

Methods

 Adds a item to the end of the list of frames.
 @param item frame to add.
void appendFrame(in gfxIImageFrame item)

        
void clear()

        
void decodingComplete()

        
void endFrameDecode(in unsigned long framenumber, in unsigned long timeout)

        
gfxIImageFrame getFrameAt(in unsigned long index)
 Create a new a aWidth x a aHeight sized image container.

 @param aWidth The width of the container in which all the
               gfxIImageFrame children will fit.
 @param aHeight The height of the container in which all the
                gfxIImageFrame children will fit.
 @param aObserver Observer to send animation notifications to.
void init(in PRInt32 aWidth, in PRInt32 aHeight, in imgIContainerObserver aObserver)

        
void removeFrame(in gfxIImageFrame item)

        
void resetAnimation()

        
void startAnimation()

        
void stopAnimation()