Struct xpcom::interfaces::imgITools
[−]
[src]
#[repr(C)]pub struct imgITools { /* fields omitted */ }
interface imgITools : nsISupports
Methods
impl imgITools
[src]
pub fn coerce<T: imgIToolsCoerce>(&self) -> &T
[src]
Cast this imgITools
to one of its base interfaces.
impl imgITools
[src]
pub unsafe fn DecodeImageFromBuffer(
&self,
aBuffer: *const c_char,
aSize: uint32_t,
aMimeType: &nsACString,
_retval: *mut *const imgIContainer
) -> nsresult
[src]
&self,
aBuffer: *const c_char,
aSize: uint32_t,
aMimeType: &nsACString,
_retval: *mut *const imgIContainer
) -> nsresult
/**
* 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);
pub unsafe fn DecodeImageAsync(
&self,
aStream: *const nsIInputStream,
aMimeType: &nsACString,
aCallback: *const imgIContainerCallback,
aEventTarget: *const nsIEventTarget
) -> nsresult
[src]
&self,
aStream: *const nsIInputStream,
aMimeType: &nsACString,
aCallback: *const imgIContainerCallback,
aEventTarget: *const nsIEventTarget
) -> nsresult
/**
* 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);
pub unsafe fn EncodeImage(
&self,
aContainer: *const imgIContainer,
aMimeType: &nsACString,
outputOptions: &nsAString,
_retval: *mut *const nsIInputStream
) -> nsresult
[src]
&self,
aContainer: *const imgIContainer,
aMimeType: &nsACString,
outputOptions: &nsAString,
_retval: *mut *const nsIInputStream
) -> nsresult
/**
* 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);
pub unsafe fn EncodeScaledImage(
&self,
aContainer: *const imgIContainer,
aMimeType: &nsACString,
aWidth: int32_t,
aHeight: int32_t,
outputOptions: &nsAString,
_retval: *mut *const nsIInputStream
) -> nsresult
[src]
&self,
aContainer: *const imgIContainer,
aMimeType: &nsACString,
aWidth: int32_t,
aHeight: int32_t,
outputOptions: &nsAString,
_retval: *mut *const nsIInputStream
) -> nsresult
/**
* 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);
pub unsafe fn GetImgLoaderForDocument(
&self,
doc: *const nsIDOMDocument,
_retval: *mut *const imgILoader
) -> nsresult
[src]
&self,
doc: *const nsIDOMDocument,
_retval: *mut *const imgILoader
) -> nsresult
/**
* 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);
pub unsafe fn GetImgCacheForDocument(
&self,
doc: *const nsIDOMDocument,
_retval: *mut *const imgICache
) -> nsresult
[src]
&self,
doc: *const nsIDOMDocument,
_retval: *mut *const imgICache
) -> nsresult
/**
* 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);
pub unsafe fn EncodeCroppedImage(
&self,
aContainer: *const imgIContainer,
aMimeType: &nsACString,
aOffsetX: int32_t,
aOffsetY: int32_t,
aWidth: int32_t,
aHeight: int32_t,
outputOptions: &nsAString,
_retval: *mut *const nsIInputStream
) -> nsresult
[src]
&self,
aContainer: *const imgIContainer,
aMimeType: &nsACString,
aOffsetX: int32_t,
aOffsetY: int32_t,
aWidth: int32_t,
aHeight: int32_t,
outputOptions: &nsAString,
_retval: *mut *const nsIInputStream
) -> nsresult
/**
* 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);
pub unsafe fn CreateScriptedObserver(
&self,
aObserver: *const imgIScriptedNotificationObserver,
_retval: *mut *const imgINotificationObserver
) -> nsresult
[src]
&self,
aObserver: *const imgIScriptedNotificationObserver,
_retval: *mut *const imgINotificationObserver
) -> nsresult
/**
* 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>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for imgITools
[src]
const IID: nsIID
IID: nsIID = nsID(1277395876, 37660, 18509, [140, 74, 151, 53, 144, 246, 110, 63])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[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]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for imgITools
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.