no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / image / imgINotificationObserver.idl
blobbf65713227feca2128f0128ae327c198a0fc749e
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsISupports.idl"
9 interface imgIRequest;
11 %{C++
12 #include "nsRect.h"
15 [ptr] native nsIntRect(nsIntRect);
17 [scriptable, builtinclass, uuid(03da5641-a333-454a-a859-036d0bb683b7)]
18 interface imgINotificationObserver : nsISupports
20 // GetWidth() and GetHeight() can now be used to retrieve the size of the
21 // image.
22 const long SIZE_AVAILABLE = 1;
24 // A region of the image (indicated by the |aRect| argument to |notify|) has
25 // changed, and needs to be redrawn. This is triggered both for incremental
26 // rendering as the image gets decoded and for changes due to animation.
27 const long FRAME_UPDATE = 2;
29 // The first frame of the image is now decoded and ready to draw.
30 const long FRAME_COMPLETE = 3;
32 // The entire image has been loaded. That doesn't mean that it has been
33 // decoded, but it does mean that imgIContainer::Draw is guaranteed to succeed
34 // (modulo decode errors, at least) if you specify FLAG_SYNC_DECODE.
35 const long LOAD_COMPLETE = 4;
37 // The entire image has been decoded.
38 const long DECODE_COMPLETE = 5;
40 // The decoded version of the image has been discarded. Content should never
41 // change as a result of this notification - discarding is an implementation
42 // detail. This notification should normally only be observed by tests.
43 const long DISCARD = 6;
45 // The image was drawn without being locked. This notification is part of the
46 // image locking mechanism that prevents visible images from being discarded;
47 // generally only image locking code needs to observe it.
48 const long UNLOCKED_DRAW = 7;
50 // The image is animated.
51 const long IS_ANIMATED = 8;
53 // The image is transparent.
54 const long HAS_TRANSPARENCY = 9;
56 [noscript, notxpcom, nostdcall]
57 void notify(in imgIRequest aProxy, in long aType,
58 [const] in nsIntRect aRect);