Back to index

lightning-sunbird  0.9+nobinonly
imgIContainer.idl
Go to the documentation of this file.
00001 
00040 #include "nsISupports.idl"
00041 #include "gfxtypes.idl"
00042 #include "gfxIFormats.idl"
00043 
00044 interface gfxIImageFrame;
00045 interface imgIContainerObserver;
00046 
00054 [scriptable, uuid(1a6290e6-8285-4e10-963d-d001f8d327b8)]
00055 interface imgIContainer : nsISupports
00056 {
00066   void init(in PRInt32 aWidth,
00067             in PRInt32 aHeight,
00068             in imgIContainerObserver aObserver);
00069 
00070 
00071   /* this should probably be on the device context (or equiv) */
00072   readonly attribute gfx_format preferredAlphaChannelFormat;
00073 
00077   readonly attribute PRInt32 width;
00078 
00082   readonly attribute PRInt32 height;
00083 
00084 
00088   readonly attribute gfxIImageFrame currentFrame;
00089 
00090 
00091   readonly attribute unsigned long numFrames;
00092 
00099   const short kNormalAnimMode   = 0;
00100   const short kDontAnimMode     = 1;
00101   const short kLoopOnceAnimMode = 2;
00102 
00103   attribute unsigned short animationMode;
00104 
00105   gfxIImageFrame getFrameAt(in unsigned long index);
00106 
00111   void appendFrame(in gfxIImageFrame item);
00112 
00113   void removeFrame(in gfxIImageFrame item);
00114 
00115   /* notification when the current frame is done decoding */
00116   void endFrameDecode(in unsigned long framenumber, in unsigned long timeout);
00117   
00118   /* notification that the entire image has been decoded */
00119   void decodingComplete();
00120   
00121   void clear();
00122 
00123   void startAnimation();
00124 
00125   void stopAnimation();
00126 
00127   void resetAnimation();
00128 
00129   /* animation stuff */
00130 
00135   attribute long loopCount;
00136 };