imgILoader

IID:4c8cf1e0-1dd2-11b2-aff9-c51cdbfcb6da
Inherits From:nsISupports

ImgILoader interface

This interface is implemented by the following components:


Methods

imgIRequest* loadImage ( nsIURI URI , nsIURI initialDocumentURL , nsIURI referrerURI , nsILoadGroup loadGroup , imgIDecoderObserver* observer , nsISupports CX , nsLoadFlags loadFlags , nsISupports cacheKey , imgIRequest* request ) imgIRequest* loadImageWithChannel ( nsIChannel channel , imgIDecoderObserver* observer , nsISupports cx , out nsIStreamListener listener ) char* supportImageWithContents ( char* contents , PRUint32 length ) 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
observer: the observer
cx: some random data
listener

char* supportImageWithContents ( char* contents , PRUint32 length )

Checks if a decoder for the given contents is available.

Arguments:
contents: The first few bytes of the image
length: The length of contents
Returns:
The Content Type of the Image or null if no decoder was found.

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.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com