Struct xpcom::interfaces::imgIContainer [] [src]

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

interface imgIContainer : nsISupports

/**
 * imgIContainer is the interface that represents an image. It allows
 * access to frames as Thebes surfaces. It also allows drawing of images
 * onto Thebes contexts.
 *
 * Internally, imgIContainer also manages animation of images.
 */

Methods

impl imgIContainer
[src]

[src]

Cast this imgIContainer to one of its base interfaces.

impl imgIContainer
[src]

TYPE_RASTER: i64 = 0
/**
    * Enumerated values for the 'type' attribute (below).
    */

TYPE_VECTOR: i64 = 1

FLAG_NONE: i64 = 0
/**
   * Flags for imgIContainer operations.
   *
   * Meanings:
   *
   * FLAG_NONE: Lack of flags.
   *
   * FLAG_SYNC_DECODE: Forces synchronous/non-progressive decode of all
   * available data before the call returns.
   *
   * FLAG_SYNC_DECODE_IF_FAST: Like FLAG_SYNC_DECODE, but requests a sync decode
   * be performed only if ImageLib estimates it can be completed very quickly.
   *
   * FLAG_ASYNC_NOTIFY: Send notifications asynchronously, even if we decode
   * synchronously beause of FLAG_SYNC_DECODE or FLAG_SYNC_DECODE_IF_FAST.
   *
   * FLAG_DECODE_NO_PREMULTIPLY_ALPHA: Do not premultiply alpha if
   * it's not already premultiplied in the image data.
   *
   * FLAG_DECODE_NO_COLORSPACE_CONVERSION: Do not do any colorspace conversion;
   * ignore any embedded profiles, and don't convert to any particular
   * destination space.
   *
   * FLAG_CLAMP: Extend the image to the fill area by clamping image sample
   * coordinates instead of by tiling. This only affects 'draw'.
   *
   * FLAG_HIGH_QUALITY_SCALING: A hint as to whether this image should be
   * scaled using the high quality scaler. Do not set this if not drawing to
   * a window or not listening to invalidations. Passing this flag will do two
   * things: 1) request a decode of the image at the size asked for by the
   * caller if one isn't already started or complete, and 2) allows a decoded
   * frame of any size (it could be neither the requested size, nor the
   * intrinsic size) to be substituted.
   *
   * FLAG_WANT_DATA_SURFACE: Can be passed to GetFrame when the caller wants a
   * DataSourceSurface instead of a hardware accelerated surface. This can be
   * important for performance (by avoiding an upload to/readback from the GPU)
   * when the caller knows they want a SourceSurface of type DATA.
   *
   * FLAG_BYPASS_SURFACE_CACHE: Forces drawing to happen rather than taking
   * cached rendering from the surface cache. This is used when we are printing,
   * for example, where we want the vector commands from VectorImages to end up
   * in the PDF output rather than a cached rendering at screen resolution.
   *
   * FLAG_FORCE_PRESERVEASPECTRATIO_NONE: Force scaling this image
   * non-uniformly if necessary. This flag is for vector image only. A raster
   * image should ignore this flag. While drawing a vector image with this
   * flag, do not force uniform scaling even if its root <svg> node has a
   * preserveAspectRatio attribute that would otherwise require uniform
   * scaling , such as xMinYMin/ xMidYMin. Always scale the graphic content of
   * the given image non-uniformly if necessary such that the image's
   * viewBox (if specified or implied by height/width attributes) exactly
   * matches the viewport rectangle.
   *
   * FLAG_FORCE_UNIFORM_SCALING: Signal to ClippedImage::OptimalSizeForDest that
   * its returned size can only scale the image's size *uniformly* (by the same
   * factor in each dimension). We need this flag when painting border-image
   * section with SVG image source-data, if the SVG image has no viewBox and no
   * intrinsic size. In such a case, we synthesize a viewport for the SVG image
   * (a "window into SVG space") based on the border image area, and we need to
   * be sure we don't subsequently scale that viewport in a way that distorts
   * its contents by stretching them more in one dimension than the other.
   */

FLAG_SYNC_DECODE: i64 = 1

FLAG_SYNC_DECODE_IF_FAST: i64 = 2

FLAG_ASYNC_NOTIFY: i64 = 4

FLAG_DECODE_NO_PREMULTIPLY_ALPHA: i64 = 8

FLAG_DECODE_NO_COLORSPACE_CONVERSION: i64 = 16

FLAG_CLAMP: i64 = 32

FLAG_HIGH_QUALITY_SCALING: i64 = 64

FLAG_WANT_DATA_SURFACE: i64 = 128

FLAG_BYPASS_SURFACE_CACHE: i64 = 256

FLAG_FORCE_PRESERVEASPECTRATIO_NONE: i64 = 512

FLAG_FORCE_UNIFORM_SCALING: i64 = 1024

DECODE_FLAGS_DEFAULT: i64 = 0
/**
   * A constant specifying the default set of decode flags (i.e., the default
   * values for FLAG_DECODE_*).
   */

FRAME_FIRST: i64 = 0
/**
    * Constants for specifying various "special" frames.
    *
    * FRAME_FIRST: The first frame
    * FRAME_CURRENT: The current frame
    *
    * FRAME_MAX_VALUE should be set to the value of the maximum constant above,
    * as it is used for ensuring that a valid value was passed in.
    */

FRAME_CURRENT: i64 = 1

FRAME_MAX_VALUE: i64 = 1

kNormalAnimMode: i64 = 0
/**
   * Animation mode Constants
   *   0 = normal
   *   1 = don't animate
   *   2 = loop once
   */

kDontAnimMode: i64 = 1

kLoopOnceAnimMode: i64 = 2

[src]

/**
   * The width of the container rectangle.  In the case of any error,
   * zero is returned, and an exception will be thrown.
   */

readonly attribute int32_t width;

[src]

/**
   * The height of the container rectangle.  In the case of any error,
   * zero is returned, and an exception will be thrown.
   */

readonly attribute int32_t height;

[src]

/**
   * The type of this image (one of the TYPE_* values above).
   */

[infallible] readonly attribute unsigned short type;

[src]

/**
   * Whether this image is animated. You can only be guaranteed that querying
   * this will not throw if STATUS_DECODE_COMPLETE is set on the imgIRequest.
   *
   * @throws NS_ERROR_NOT_AVAILABLE if the animated state cannot be determined.
   */

readonly attribute boolean animated;

[src]

/**
   * Returns true if this image will draw opaquely right now if asked to draw
   * with FLAG_HIGH_QUALITY_SCALING and otherwise default flags. If this image
   * (when decoded) is opaque but no decoded frames are available then
   * willDrawOpaqueNow will return false.
   */

[noscript,notxpcom] boolean willDrawOpaqueNow ();

[src]

[noscript] void startDecoding (in uint32_t aFlags);

[src]

[noscript,notxpcom] boolean startDecodingWithResult (in uint32_t aFlags);

[src]

/**
    * Increments the lock count on the image. An image will not be discarded
    * as long as the lock count is nonzero. Note that it is still possible for
    * the image to be undecoded if decode-on-draw is enabled and the image
    * was never drawn.
    *
    * Upon instantiation images have a lock count of zero.
    */

void lockImage ();

[src]

/**
    * Decreases the lock count on the image. If the lock count drops to zero,
    * the image is allowed to discard its frame data to save memory.
    *
    * Upon instantiation images have a lock count of zero. It is an error to
    * call this method without first having made a matching lockImage() call.
    * In other words, the lock count is not allowed to be negative.
    */

void unlockImage ();

[src]

/**
   * If this image is unlocked, discard its decoded data.  If the image is
   * locked or has already been discarded, do nothing.
   */

void requestDiscard ();

[src]

attribute unsigned short animationMode;

[src]

attribute unsigned short animationMode;

[src]

void resetAnimation ();

[src]

[notxpcom] float getFrameIndex (in uint32_t aWhichFrame);

[src]

[notxpcom] int32_t getFirstFrameDelay ();

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 imgIContainer
[src]

IID: nsIID = nsID(2832985636, 65414, 18261, [180, 14, 81, 23, 92, 175, 49, 175])

[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 imgIContainer
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for imgIContainer
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.