gfxIImageContainer interface

 @author Stuart Parmenter <pavlov@netscape.com>
 @version 0.1
 @see "gfx2"
[scriptable, uuid(186e80e1-476c-47f0-b340-424e6b7b6c9c)]
interface imgIContainer : nsISupports

Constants

 
 "Disposal" method indicates how the image should be handled before the
  subsequent image is displayed.
  Don't change these without looking at the implementations using them,
  struct gif_struct::disposal_method and gif_write() in particular.
const long kDisposeClearAll = -1

          
const long kDisposeNotSpecified = 0

          
const long kDisposeKeep = 1

          
const long kDisposeClear = 2

          
const long kDisposeRestorePrevious = 3

          
const long kBlendSource = 0

          
const long kBlendOver = 1
 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


          
[noscript] void addRestoreData([const, array, size_is(aCount)] in char data, in unsigned long aCount)
 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()

          
[noscript] void restoreDataDone()

          
[noscript] void setDiscardable(in string aMimeType)

          
void startAnimation()

          
void stopAnimation()