Struct xpcom::interfaces::imgITools [] [src]

#[repr(C)]
pub struct imgITools { /* fields omitted */ }

interface imgITools : nsISupports

Methods

impl imgITools
[src]

[src]

Cast this imgITools to one of its base interfaces.

impl imgITools
[src]

[src]

/**
     * decodeImageFromBuffer
     * Caller provides an buffer, a buffer size and a mimetype. We read from
     * the stream and decompress it (according to the specified mime type) and
     * return the resulting imgIContainer.
     *
     * @param aBuffer
     *        Data in memory.
     * @param aSize
     *        Buffer size.
     * @param aMimeType
     *        Type of image in the stream.
     */

imgIContainer decodeImageFromBuffer (in string aBuffer, in unsigned long aSize, in ACString aMimeType);

[src]

/**
     * decodeImageAsync
     * See decodeImage. The main difference between this method and decodeImage
     * is that here the operation is done async on a thread from the decode
     * pool. When the operation is completed, the callback is executed with the
     * result.
     *
     * @param aStream
     *        An input stream for an encoded image file.
     * @param aMimeType
     *        Type of image in the stream.
     * @param aCallback
     *        The callback is executed when the imgContainer is fully created.
     * @param aEventTarget
     *        This eventTarget is used to execute aCallback
     */

void decodeImageAsync (in nsIInputStream aStream, in ACString aMimeType, in imgIContainerCallback aCallback, in nsIEventTarget aEventTarget);

[src]

/**
     * encodeImage
     * Caller provides an image container, and the mime type it should be
     * encoded to. We return an input stream for the encoded image data.
     *
     * @param aContainer
     *        An image container.
     * @param aMimeType
     *        Type of encoded image desired (eg "image/png").
     * @param outputOptions
     *        Encoder-specific output options.
     */

nsIInputStream encodeImage (in imgIContainer aContainer, in ACString aMimeType, [optional] in AString outputOptions);

[src]

/**
     * encodeScaledImage
     * Caller provides an image container, and the mime type it should be
     * encoded to. We return an input stream for the encoded image data.
     * The encoded image is scaled to the specified dimensions.
     *
     * @param aContainer
     *        An image container.
     * @param aMimeType
     *        Type of encoded image desired (eg "image/png").
     * @param aWidth, aHeight
     *        The size (in pixels) desired for the resulting image. Specify 0 to
     *        use the given image's width or height. Values must be >= 0.
     * @param outputOptions
     *        Encoder-specific output options.
     */

nsIInputStream encodeScaledImage (in imgIContainer aContainer, in ACString aMimeType, in long aWidth, in long aHeight, [optional] in AString outputOptions);

[src]

/**
     * getImgLoaderForDocument
     * Retrieve an image loader that reflects the privacy status of the given
     * document.
     *
     * @param doc
     *        A document. Must not be null.
     */

imgILoader getImgLoaderForDocument (in nsIDOMDocument doc);

[src]

/**
     * getImgLoaderForDocument
     * Retrieve an image cache that reflects the privacy status of the given
     * document.
     *
     * @param doc
     *        A document. Null is allowed, but must _only_ be passed
     *        when there is no way to obtain a relevant document for
     *        the current context in which a cache is desired.
     */

imgICache getImgCacheForDocument (in nsIDOMDocument doc);

[src]

/**
     * encodeCroppedImage
     * Caller provides an image container, and the mime type it should be
     * encoded to. We return an input stream for the encoded image data.
     * The encoded image is cropped to the specified dimensions.
     *
     * The given offset and size must not exceed the image bounds.
     *
     * @param aContainer
     *        An image container.
     * @param aMimeType
     *        Type of encoded image desired (eg "image/png").
     * @param aOffsetX, aOffsetY
     *        The crop offset (in pixels). Values must be >= 0.
     * @param aWidth, aHeight
     *        The size (in pixels) desired for the resulting image. Specify 0 to
     *        use the given image's width or height. Values must be >= 0.
     * @param outputOptions
     *        Encoder-specific output options.
     */

nsIInputStream encodeCroppedImage (in imgIContainer aContainer, in ACString aMimeType, in long aOffsetX, in long aOffsetY, in long aWidth, in long aHeight, [optional] in AString outputOptions);

[src]

/**
     * Create a wrapper around a scripted notification observer (ordinarily
     * imgINotificationObserver cannot be implemented from scripts).
     *
     * @param aObserver The scripted observer to wrap
     */

imgINotificationObserver createScriptedObserver (in imgIScriptedNotificationObserver aObserver);

Methods from Deref<Target = nsISupports>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for imgITools
[src]

IID: nsIID = nsID(1277395876, 37660, 18509, [140, 74, 151, 53, 144, 246, 110, 63])

[src]

Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more

impl RefCounted for imgITools
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for imgITools
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.