nsISupports
Last changed in Gecko 14.0 (Firefox 14.0 / Thunderbird 14.0 / SeaMonkey 2.11)Implemented by: ?????????????????????????????????????
. To create an instance, use:
Implemented by: ?????????????????????????????????????
as a service:
var imgIContainer = Components.classes["@mozilla.org/????????????????????????????"] .createInstance(Components.interfaces.imgIContainer);
void addRestoreData([array, size_is(aCount), const] in char data, in unsigned long aCount); Native code only! Obsolete since Gecko 2.0 |
void appendFrame(in PRInt32 aX, in PRInt32 aY, in PRInt32 aWidth, in PRInt32 aHeight, in gfxImageFormat aFormat, [array, size_is(imageLength)] out PRUint8 imageData, out unsigned long imageLength); Native code only! Obsolete since Gecko 2.0 |
void appendPalettedFrame(in PRInt32 aX, in PRInt32 aY, in PRInt32 aWidth, in PRInt32 aHeight, in gfxImageFormat aFormat, in PRUint8 aPaletteDepth, [array, size_is(imageLength)] out PRUint8 imageData, out unsigned long imageLength, [array, size_is(paletteLength)] out PRUint32 paletteData, out unsigned long paletteLength); Native code only! Obsolete since Gecko 2.0 |
void clear(); Obsolete since Gecko 1.9.2 |
gfxImageSurface copyCurrentFrame(); Native code only! Obsolete since Gecko 2.0 |
gfxImageSurface copyFrame(in PRUint32 aWhichFrame, in PRUint32 aFlags); Native code only! |
void decodingComplete(); Obsolete since Gecko 2.0 |
void draw(in gfxContext aContext, in gfxGraphicsFilter aFilter, [const] in gfxMatrix aUserSpaceToImageSpace, [const] in gfxRect aFill, [const] in nsIntRect aSubimage, [const] in nsIntSize aViewportSize, in PRUint32 aFlags); Native code only! |
void endFrameDecode(in unsigned long framenumber); Obsolete since Gecko 2.0 |
void ensureCleanFrame(in unsigned long aFramenum, in PRInt32 aX, in PRInt32 aY, in PRInt32 aWidth, in PRInt32 aHeight, in gfxImageFormat aFormat, [array, size_is(imageLength)] out PRUint8 imageData, out unsigned long imageLength); Native code only! Obsolete since Gecko 2.0 |
imgIContainer extractCurrentFrame([const] in nsIntRect aRect); Native code only! Obsolete since Gecko 2.0 |
imgIContainer extractFrame(in PRUint32 aWhichFrame, [const] in nsIntRect aRect, in PRUint32 aFlags); Native code only! |
void frameUpdated(in unsigned long framenum, in nsIntRect aNewRect); Native code only! Obsolete since Gecko 2.0 |
void getCurrentFrameRect(in nsIntRect aFrameRect); Native code only! Obsolete since Gecko 2.0 |
gfxASurface getFrame(in PRUint32 aWhichFrame, in PRUint32 aFlags); Native code only! |
gfxIImageFrame getFrameAt(in unsigned long index); Obsolete since Gecko 1.9.2 |
void getFrameColormap(in unsigned long framenumber, [array, size_is(paletteLength)] out PRUint32 paletteData, out unsigned long paletteLength); Obsolete since Gecko 2.0 |
unsigned long getFrameImageDataLength(in unsigned long framenumber); Obsolete since Gecko 2.0 |
ImageContainer getImageContainer(); Native code only! |
nsIFrame GetRootLayoutFrame(); Violates the XPCOM interface guidelines |
PRUint16 GetType(); Violates the XPCOM interface guidelines |
void init(in PRInt32 aWidth, in PRInt32 aHeight, in imgIContainerObserver aObserver); Obsolete since Gecko 2.0 |
void lockImage(); |
void removeFrame(in gfxIImageFrame item); Obsolete since Gecko 1.9.2 |
void requestDecode(); |
void requestDiscard(); |
void requestRefresh([const] in TimeStamp aTime); Violates the XPCOM interface guidelines |
void resetAnimation(); |
void restoreDataDone(); Native code only! Obsolete since Gecko 2.0 |
void setDiscardable(in string aMimeType); Native code only! Obsolete since Gecko 2.0 |
void setFrameBlendMethod(in unsigned long framenumber, in PRInt32 aBlendMethod); Obsolete since Gecko 2.0 |
void setFrameDisposalMethod(in unsigned long framenumber, in PRInt32 aDisposalMethod); Obsolete since Gecko 2.0 |
void setFrameHasNoAlpha(in unsigned long framenumber); Obsolete since Gecko 2.0 |
void setFrameTimeout(in unsigned long framenumber, in PRInt32 aTimeout); Obsolete since Gecko 2.0 |
void startAnimation(); Obsolete since Gecko 2.0 |
void stopAnimation(); Obsolete since Gecko 2.0 |
void unlockImage(); |
Attribute | Type | Description |
animated |
boolean |
Whether this image is animated . You can only be guaranteed that querying this will not throw if STATUS_DECODE_COMPLETE is set on the imgIRequest . Read only.
Exceptions thrown
|
animationMode |
unsigned short |
|
currentFrame |
gfxASurface |
Get a surface for the current frame. This may be a platform-native, optimized frame, so you cannot inspect its pixel data. Read only. Native code only! Obsolete since Gecko 2.0 |
currentFrameIndex |
unsigned long |
The index of the current frame that would be drawn if the image was to be drawn now. Read only. Obsolete since Gecko 2.0 |
currentFrameIsOpaque |
boolean |
Whether the current frame is opaque; that is, needs the background painted behind it. Read only. |
height |
PRInt32 |
The height of the container rectangle. In the case of any error, zero is returned, and an exception will be thrown. Read only. |
loopCount |
long |
number of times to loop the image. Note: -1 means forever. Obsolete since Gecko 2.0 |
numFrames |
unsigned long |
The total number of frames in this image. Read only. Obsolete since Gecko 2.0 |
preferredAlphaChannelFormat |
gfx_format |
Read only. Obsolete since Gecko 1.9.2 |
type |
unsigned short |
The type of this image (one of the TYPE_* values above). Read only. |
width |
PRInt32 |
The width of the container rectangle. In the case of any error, zero is returned, and an exception will be thrown. Read only. |
Constant | Value | Description |
TYPE_RASTER |
0 |
Enumerated values for the 'type ' attribute (below). |
TYPE_VECTOR |
1 |
|
FLAG_NONE |
0x0 |
Flags for Meanings:
FLAG_CLAMP : Extend the image to the fill area by clamping image sample coordinates instead of by tiling. This only affects 'draw() '. |
FLAG_SYNC_DECODE |
0x1 |
|
FLAG_DECODE_NO_PREMULTIPLY_ALPHA |
0x2 |
|
FLAG_DECODE_NO_COLORSPACE_CONVERSION |
0x4 |
|
FLAG_CLAMP |
0x8 |
|
FRAME_FIRST |
0 |
Constants for specifying various "special" frames.
FRAME_MAX_VALUE should be set to the value of the maximum constant above, as it is used for ensuring that a valid value was passed in. |
FRAME_CURRENT |
1 |
|
FRAME_MAX_VALUE |
1 |
|
kNormalAnimMode |
0 |
Animation mode Constants 0 = normal 1 = do not animate 2 = loop once. |
kDontAnimMode |
1 |
|
kLoopOnceAnimMode |
2 |
|
kDisposeClearAll |
-1 |
"Disposal" method indicates how the image should be handled before the subsequent image is displayed. Do not change these without looking at the implementations using them, struct gif_struct::disposal_method and gif_write() in particular. Clear() the whole image, revealing. Obsolete since Gecko 2.0 |
kDisposeNotSpecified |
0 |
Leave frame, let new frame draw() on top. Obsolete since Gecko 2.0 |
kDisposeKeep |
1 |
Leave frame, let new frame draw() on top. Obsolete since Gecko 2.0 |
kDisposeClear |
2 |
Clear() the frame's area, revealing bg. Obsolete since Gecko 2.0 |
kDisposeRestorePrevious |
3 |
Restore the previous(composited) frame. Obsolete since Gecko 2.0 |
kBlendSource |
0 |
All color components of the frame, including alpha, const long kBlendOver = 1; // The frame should be composited onto the output buffer. Obsolete since Gecko 2.0 |
Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
void addRestoreData( [array, size_is(aCount), const] in char data, in unsigned long aCount );
data
aCount
Missing Exception
Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
Adds to the end of the list of frames.
void appendFrame( in PRInt32 aX, in PRInt32 aY, in PRInt32 aWidth, in PRInt32 aHeight, in gfxImageFormat aFormat, [array, size_is(imageLength)] out PRUint8 imageData, out unsigned long imageLength );
aX
aY
aWidth
aHeight
aFormat
imageData
imageLength
Missing Exception
Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
void appendPalettedFrame( in PRInt32 aX, in PRInt32 aY, in PRInt32 aWidth, in PRInt32 aHeight, in gfxImageFormat aFormat, in PRUint8 aPaletteDepth, [array, size_is(imageLength)] out PRUint8 imageData, out unsigned long imageLength, [array, size_is(paletteLength)] out PRUint32 paletteData, out unsigned long paletteLength );
aX
aY
aWidth
aHeight
aFormat
aPaletteDepth
imageData
imageLength
paletteData
paletteLength
Missing Exception
void clear();
None.
Missing Exception
Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
Create and return a new copy of the current frame that you can write to and otherwise inspect the pixels of.
gfxImageSurface copyCurrentFrame();
None.
Missing Description
Missing Exception
Create and return a new copy of the given frame that you can write to and otherwise inspect the pixels of.
gfxImageSurface copyFrame( in PRUint32 aWhichFrame, in PRUint32 aFlags );
aWhichFrame
aFlags
Missing Description
Missing Exception
void decodingComplete();
None.
Missing Exception
Draw
the current frame on to the context specified.
void draw( in gfxContext aContext, in gfxGraphicsFilter aFilter, [const] in gfxMatrix aUserSpaceToImageSpace, [const] in gfxRect aFill, [const] in nsIntRect aSubimage, [const] in nsIntSize aViewportSize, in PRUint32 aFlags );
aContext
draw
the image to.aFilter
aUserSpaceToImageSpace
aFill
draw
pixels to. When aFlags includes FLAG_CLAMP
, the image will be extended to this area by clamping image sample coordinates. Otherwise, the image will be automatically tiled as necessary.aSubimage
aViewportSize
aFlags
Missing Exception
void endFrameDecode( in unsigned long framenumber );
framenumber
Missing Exception
Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
Create or reuse a frame at index aFrameNum. It is an error to call this with aFrameNum not in the range [0, numFrames
].
void ensureCleanFrame( in unsigned long aFramenum, in PRInt32 aX, in PRInt32 aY, in PRInt32 aWidth, in PRInt32 aHeight, in gfxImageFormat aFormat, [array, size_is(imageLength)] out PRUint8 imageData, out unsigned long imageLength );
aFramenum
aX
aY
aWidth
aHeight
aFormat
imageData
imageLength
Missing Exception
Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
Create a new imgContainer that contains only a single frame, which itself contains a subregion of the current frame.
imgIContainer extractCurrentFrame( [const] in nsIntRect aRect );
aRect
Missing Description
Missing Exception
Create a new imgContainer that contains only a single frame, which itself contains a subregion of the given frame.
imgIContainer extractFrame( in PRUint32 aWhichFrame, [const] in nsIntRect aRect, in PRUint32 aFlags );
aWhichFrame
aRect
aFlags
Missing Description
Missing Exception
Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
void frameUpdated( in unsigned long framenum, in nsIntRect aNewRect );
framenum
aNewRect
Missing Exception
Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
The rectangle defining the location and size of the currently displayed frame. Should be an attribute, but cannot be because of reference/pointer conflicts with native types in xpidl.
void getCurrentFrameRect( in nsIntRect aFrameRect );
aFrameRect
Missing Exception
Get a surface for the given frame. This may be a platform-native, optimized surface, so you cannot inspect its pixel data.
gfxASurface getFrame( in PRUint32 aWhichFrame, in PRUint32 aFlags );
aWhichFrame
aFlags
Missing Description
Missing Exception
gfxIImageFrame getFrameAt( in unsigned long index );
index
Missing Description
Missing Exception
Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
void getFrameColormap( in unsigned long framenumber, [array, size_is(paletteLength)] out PRUint32 paletteData, out unsigned long paletteLength );
framenumber
paletteData
paletteLength
Missing Exception
Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
Get the size, in bytes, of a particular frame's image data.
unsigned long getFrameImageDataLength( in unsigned long framenumber );
framenumber
Missing Description
Missing Exception
Attempts to create an ImageContainer (and Image) containing the current frame. Only valid for RASTER type
images.
ImageContainer getImageContainer();
None.
Missing Description
Missing Exception
If this image is TYPE_VECTOR
, that is really an embedded SVG document, and this method returns a pointer to the root nsIFrame
of that document. If not (or if the root nsIFrame
is not available for some reason), this method returns nsnull.
"notxpcom" for convenience, since we have no need for nsresult return-val.
nsIFrame GetRootLayoutFrame();
None.
Missing Description
Missing Exception
Direct C++ accessor for 'type
' attribute, for convenience.
PRUint16 GetType();
None.
Missing Description
Missing Exception
Create a new \a aWidth x \a aHeight sized image container.
void init( in PRInt32 aWidth, in PRInt32 aHeight, in imgIContainerObserver aObserver );
aWidth
width
of the container in which all the frames will fit.aHeight
height
of the container in which all the frames will fit.aObserver
Missing Exception
Increments the lock count on the image. An image will not be discarded as long as the lock count is nonzero. Note that it is still possible for the image to be undecoded if decode-on-draw()
is enabled and the image was never drawn.
Upon instantiation images have a lock count of zero.
void lockImage();
None.
Missing Exception
void removeFrame( in gfxIImageFrame item );
item
Missing Exception
void requestDecode();
None.
Missing Exception
If this image is unlocked, discard its decoded data. If the image is locked or has already been discarded, do nothing.
void requestDiscard();
None.
Missing Exception
Indicates that this imgIContainer
has been triggered to update its internal animation state. Likely this should only be called from within nsImageFrame
or objects of similar type
.
void requestRefresh( [const] in TimeStamp aTime );
aTime
Missing Exception
void resetAnimation();
None.
Missing Exception
Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
void restoreDataDone();
None.
Missing Exception
Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
void setDiscardable( in string aMimeType );
aMimeType
Missing Exception
Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
void setFrameBlendMethod( in unsigned long framenumber, in PRInt32 aBlendMethod );
framenumber
aBlendMethod
Missing Exception
Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
void setFrameDisposalMethod( in unsigned long framenumber, in PRInt32 aDisposalMethod );
framenumber
aDisposalMethod
Missing Exception
Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
void setFrameHasNoAlpha( in unsigned long framenumber );
framenumber
Missing Exception
Obsolete since Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
void setFrameTimeout( in unsigned long framenumber, in PRInt32 aTimeout );
framenumber
aTimeout
Missing Exception
void startAnimation();
None.
Missing Exception
void stopAnimation();
None.
Missing Exception
Decreases the lock count on the image. If the lock count drops to zero, the image is allowed to discard its frame data to save memory.
Upon instantiation images have a lock count of zero. It is an error to call this method without first having made a matching lockImage()
call. In other words, the lock count is not allowed to be negative.
void unlockImage();
None.
Missing Exception
---