tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

imgINotificationObserver.idl (2118B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
      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/. */
      6 
      7 #include "nsISupports.idl"
      8 
      9 interface imgIRequest;
     10 
     11 %{C++
     12 #include "nsRect.h"
     13 %}
     14 
     15 [ptr] native nsIntRect(nsIntRect);
     16 
     17 [scriptable, builtinclass, uuid(03da5641-a333-454a-a859-036d0bb683b7)]
     18 interface imgINotificationObserver : nsISupports
     19 {
     20  // GetWidth() and GetHeight() can now be used to retrieve the size of the
     21  // image.
     22  const long SIZE_AVAILABLE = 1;
     23 
     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;
     28 
     29  // The first frame of the image is now decoded and ready to draw.
     30  const long FRAME_COMPLETE = 3;
     31 
     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;
     36 
     37  // The entire image has been decoded.
     38  const long DECODE_COMPLETE = 5;
     39 
     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;
     44 
     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;
     49 
     50  // The image is animated.
     51  const long IS_ANIMATED = 8;
     52 
     53  // The image is transparent.
     54  const long HAS_TRANSPARENCY = 9;
     55 
     56  [noscript, notxpcom, nostdcall]
     57  void notify(in imgIRequest aProxy, in long aType,
     58              [const] in nsIntRect aRect);
     59 };