WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

imgIContainer

IID:1a6290e6-8285-4e10-963d-d001f8d327b8
Inherits From:nsISupports

GfxIImageContainer interface

This interface is implemented by the following components:


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.
PRInt32 kDisposeClearAll = -1
PRInt32 kDisposeNotSpecified = 0
PRInt32 kDisposeKeep = 1
PRInt32 kDisposeClear = 2
PRInt32 kDisposeRestorePrevious = 3
PRInt32 kBlendSource = 0
PRInt32 kBlendOver = 1
Animation mode Constants 0 = normal 1 = don't animate 2 = loop once
PRInt16 kNormalAnimMode = 0
PRInt16 kDontAnimMode = 1
PRInt16 kLoopOnceAnimMode = 2

Properties

PRUint16 animationMode

readonly gfxIImageFrame currentFrame

Get the current frame that would be drawn if the image was to be drawn now

readonly PRInt32 height

The height of the container rectangle.

PRInt32 loopCount

Number of times to loop the image.

readonly PRUint32 numFrames

readonly gfx_format preferredAlphaChannelFormat

readonly PRInt32 width

The width of the container rectangle.


Methods

[noscript] void addRestoreData ( arrayof char data , PRUint32 count ) void appendFrame ( gfxIImageFrame item ) void clear ( ) void decodingComplete ( ) void endFrameDecode ( PRUint32 framenumber , PRUint32 timeout ) gfxIImageFrame getFrameAt ( PRUint32 index ) void init ( PRInt32 width , PRInt32 height , imgIContainerObserver observer ) void removeFrame ( gfxIImageFrame item ) void resetAnimation ( ) [noscript] void restoreDataDone ( ) [noscript] void setDiscardable ( char* mimeType ) void startAnimation ( ) void stopAnimation ( )

void addRestoreData ( arrayof char data , PRUint32 count )

Arguments:
data
count

void appendFrame ( gfxIImageFrame item )

Adds \a item to the end of the list of frames.

Arguments:
item: frame to add.

void clear ( )


void decodingComplete ( )


void endFrameDecode ( PRUint32 framenumber , PRUint32 timeout )

Arguments:
framenumber
timeout

gfxIImageFrame getFrameAt ( PRUint32 index )

Arguments:
index

void init ( PRInt32 width , PRInt32 height , imgIContainerObserver observer )

Create a new \a width x \a height sized image container.

Arguments:
width: The width of the container in which all the gfxIImageFrame children will fit.
height: The height of the container in which all the gfxIImageFrame children will fit.
observer: Observer to send animation notifications to.

void removeFrame ( gfxIImageFrame item )

Arguments:
item

void resetAnimation ( )


void restoreDataDone ( )


void setDiscardable ( char* mimeType )

Arguments:
mimeType

void startAnimation ( )


void stopAnimation ( )


References

This interface is the type of the following properties:

imgILoad.image, imgIRequest.image, nsIContextMenuInfo.backgroundImageContainer, nsIContextMenuInfo.imageContainer

This interface is passed as an argument to the following methods:

imgIContainerObserver.frameChanged, imgIDecoderObserver.onStartContainer, imgIDecoderObserver.onStopContainer, imgITools.decodeImageData, imgITools.encodeImage, imgITools.encodeScaledImage

Reference documentation is generated from Mozilla's source.