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.

imgILoader

IID:d2f50c69-1064-4ce3-a92d-01dc5f5b4842
Inherits From:nsISupports

ImgILoader interface

This interface is implemented by the following components:


Methods

[noscript] imgIRequest loadImage ( nsIURI URI , nsIURI initialDocumentURL , nsIURI referrerURI , nsILoadGroup loadGroup , imgIDecoderObserver observer , nsISupports CX , nsLoadFlags loadFlags , nsISupports cacheKey , imgIRequest request ) [noscript] imgIRequest loadImageWithChannel ( nsIChannel channel , imgIDecoderObserver observer , nsISupports cx , out nsIStreamListener listener ) PRBool supportImageWithMimeType ( char* mimeType )

imgIRequest loadImage ( nsIURI URI , nsIURI initialDocumentURL , nsIURI referrerURI , nsILoadGroup loadGroup , imgIDecoderObserver observer , nsISupports CX , nsLoadFlags loadFlags , nsISupports cacheKey , imgIRequest request )

Start the load and decode of an image.

Libpr0n does NOT keep a strong ref to the observer; this prevents reference cycles. This means that callers of loadImage should make sure to Cancel() the resulting request before the observer goes away.

Arguments:
URI: the URI to load
initialDocumentURL
referrerURI: the 'referring' URI
loadGroup: Loadgroup to put the image load into
observer: the observer
CX: some random data
loadFlags: Load flags for the request
cacheKey: cache key to use for a load if the original image came from a request that had post data
request: A newly created, unused imgIRequest object or NULL for one to be created for you.

imgIRequest loadImageWithChannel ( nsIChannel channel , imgIDecoderObserver observer , nsISupports cx , out nsIStreamListener listener )

Start the load and decode of an image.

Libpr0n does NOT keep a strong ref to the observer; this prevents reference cycles. This means that callers of loadImageWithChannel should make sure to Cancel() the resulting request before the observer goes away.

Arguments:
channel: the channel to load the image from. This must already be opened before ths method is called, and there must have been no OnDataAvailable calls for it yet.
observer: the observer
cx: some random data
listener: [out] A listener that should receive the data. Can be null, in which case imagelib has found a cached image and is not interested in the data. The caller needs not cancel the channel in this case.

PRBool supportImageWithMimeType ( char* mimeType )

Checks if a decoder for the an image with the given mime type is available

Arguments:
mimeType: The type to find a decoder for
Returns:
true if a decoder is available, false otherwise

Reference documentation is generated from Mozilla's source.