2012-10-12 09:11:22 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
interface imgIRequest;
|
|
|
|
|
|
|
|
%{C++
|
|
|
|
#include "nsRect.h"
|
|
|
|
%}
|
|
|
|
|
|
|
|
[ptr] native nsIntRect(nsIntRect);
|
|
|
|
|
2014-11-17 11:16:45 -08:00
|
|
|
[scriptable, builtinclass, uuid(03da5641-a333-454a-a859-036d0bb683b7)]
|
2012-10-12 09:11:22 -07:00
|
|
|
interface imgINotificationObserver : nsISupports
|
|
|
|
{
|
2014-11-17 14:29:56 -08:00
|
|
|
// GetWidth() and GetHeight() can now be used to retrieve the size of the
|
|
|
|
// image.
|
2012-10-12 09:11:23 -07:00
|
|
|
const long SIZE_AVAILABLE = 1;
|
2014-11-17 14:29:56 -08:00
|
|
|
|
|
|
|
// A region of the image (indicated by the |aRect| argument to |notify|) has
|
|
|
|
// changed, and needs to be redrawn. This is triggered both for incremental
|
|
|
|
// rendering as the image gets decoded and for changes due to animation.
|
2012-10-12 09:11:23 -07:00
|
|
|
const long FRAME_UPDATE = 2;
|
2014-11-17 14:29:56 -08:00
|
|
|
|
|
|
|
// The first frame of the image is now decoded and ready to draw.
|
2012-10-12 09:11:23 -07:00
|
|
|
const long FRAME_COMPLETE = 3;
|
2014-11-17 14:29:56 -08:00
|
|
|
|
|
|
|
// The entire image has been loaded. That doesn't mean that it has been
|
|
|
|
// decoded, but it does mean that imgIContainer::Draw is guaranteed to succeed
|
|
|
|
// (modulo decode errors, at least) if you specify FLAG_SYNC_DECODE.
|
2012-10-12 09:11:23 -07:00
|
|
|
const long LOAD_COMPLETE = 4;
|
2014-11-17 14:29:56 -08:00
|
|
|
|
|
|
|
// The entire image has been decoded.
|
2012-10-12 09:11:23 -07:00
|
|
|
const long DECODE_COMPLETE = 5;
|
2014-11-17 14:29:56 -08:00
|
|
|
|
|
|
|
// The decoded version of the image has been discarded. Content should never
|
|
|
|
// change as a result of this notification - discarding is an implementation
|
|
|
|
// detail. This notification should normally only be observed by tests.
|
2012-10-12 09:11:23 -07:00
|
|
|
const long DISCARD = 6;
|
2014-11-17 14:29:56 -08:00
|
|
|
|
|
|
|
// The image was drawn without being locked. This notification is part of the
|
|
|
|
// image locking mechanism that prevents visible images from being discarded;
|
|
|
|
// generally only image locking code needs to observe it.
|
2013-02-24 16:59:22 -08:00
|
|
|
const long UNLOCKED_DRAW = 7;
|
2014-11-17 14:29:56 -08:00
|
|
|
|
|
|
|
// The image is animated.
|
2013-02-24 16:59:22 -08:00
|
|
|
const long IS_ANIMATED = 8;
|
2014-11-17 14:29:56 -08:00
|
|
|
|
|
|
|
// The image is transparent.
|
2014-11-17 11:16:45 -08:00
|
|
|
const long HAS_TRANSPARENCY = 9;
|
2012-10-12 09:11:22 -07:00
|
|
|
|
2014-12-05 15:12:08 -08:00
|
|
|
[noscript] void notify(in imgIRequest aProxy, in long aType,
|
|
|
|
[const] in nsIntRect aRect);
|
2012-10-12 09:11:22 -07:00
|
|
|
};
|