Bug 461810 - Video content menu should operate on .currentSrc, not .src. r=gavin
[wine-gecko.git] / gfx / idl / gfxIImageFrame.idl
blob4eda62b4a82bdd3fa9a54bb14ee268ab21323d6c
1 /** -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
16 * The Original Code is mozilla.org code.
18 * The Initial Developer of the Original Code is
19 * Netscape Communications Corporation.
20 * Portions created by the Initial Developer are Copyright (C) 2001
21 * the Initial Developer. All Rights Reserved.
23 * Contributor(s):
24 * Stuart Parmenter <pavlov@netscape.com>
25 * Chris Saari <saari@netscape.com>
27 * Alternatively, the contents of this file may be used under the terms of
28 * either of the GNU General Public License Version 2 or later (the "GPL"),
29 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30 * in which case the provisions of the GPL or the LGPL are applicable instead
31 * of those above. If you wish to allow use of your version of this file only
32 * under the terms of either the GPL or the LGPL, and not to allow others to
33 * use your version of this file under the terms of the MPL, indicate your
34 * decision by deleting the provisions above and replace them with the notice
35 * and other provisions required by the GPL or the LGPL. If you do not delete
36 * the provisions above, a recipient may use your version of this file under
37 * the terms of any one of the MPL, the GPL or the LGPL.
39 * ***** END LICENSE BLOCK ***** */
41 #include "nsISupports.idl"
42 #include "gfxtypes.idl"
43 #include "gfxIFormats.idl"
45 %{C++
46 #include "nsRect.h"
49 native nsRectRef(nsIntRect &);
51 /**
52 * gfxIImageFrame interface
54 * All x, y, width, height values are in pixels.
56 * @author Tim Rowley <tor@cs.brown.edu>
57 * @author Stuart Parmenter <pavlov@netscape.com>
58 * @version 0.1
60 [scriptable, uuid(9c37930b-cadd-453c-89e1-9ed456715b9c)]
61 interface gfxIImageFrame : nsISupports
63 /**
64 * Create a new \a aWidth x \a aHeight sized image.
66 * @param aX The x-offset from the origin of the gfxIImageContainer parent.
67 * @param aY The y-offset from the origin of the gfxIImageContainer parent.
68 * @param aWidth The width of the image to create.
69 * @param aHeight The height of the image to create.
70 * @param aFormat the width of the image to create.
72 * @note The data in a new image is uninitialized.
74 void init(in PRInt32 aX,
75 in PRInt32 aY,
76 in PRInt32 aWidth,
77 in PRInt32 aHeight,
78 in gfx_format aFormat,
79 in gfx_depth aDepth);
81 /**
82 * TRUE by default. When set to FALSE, you will no longer be able to make any modifications
83 * to the data of the image. Any attempts will fail.
85 attribute boolean mutable;
87 /**
88 * The x-offset of the image.
90 readonly attribute PRInt32 x;
92 /**
93 * The y-offset of the image.
95 readonly attribute PRInt32 y;
97 /**
98 * The width of the image.
100 readonly attribute PRInt32 width;
103 * The height of the image.
105 readonly attribute PRInt32 height;
108 * The rectangle this frame ocupies.
109 * @param rect this is really an out parameter.
111 [noscript] void getRect(in nsRectRef rect);
114 * The image data format the image was created with.
115 * @see gfxIFormats
117 readonly attribute gfx_format format;
120 * returns whether the image requires the background to be painted
122 readonly attribute boolean needsBackground;
124 /* data accessors */
125 readonly attribute unsigned long imageBytesPerRow;
128 * returns the number of bytes allocated for the image
130 readonly attribute unsigned long imageDataLength;
132 // XXX do we copy here? lets not...
133 void getImageData([array, size_is(length)] out PRUint8 bits, out unsigned long length);
136 * Get Palette data pointer
138 void getPaletteData([array, size_is(length)] out gfx_color palette, out unsigned long length);
141 * Lock image pixels before addressing the data directly
143 void lockImageData();
146 * Unlock image pixels
148 void unlockImageData();
151 /* GIF Specific methods. These should be in a different class or interface. */
154 * Represents the number of milliseconds until the next frame should be displayed.
155 * @note -1 means that this frame should be displayed forever.
157 attribute long timeout;
159 /* frame disposal method, used only by GIFs. Should probably subclass image frame
160 * and image container for GIFs special needs, but for simplicity it is here for the
161 * moment
163 attribute long frameDisposalMethod;
165 /* PNG specific methods */
167 attribute long blendMethod;