Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/imgIContainer.idl
3 : */
4 :
5 : #ifndef __gen_imgIContainer_h__
6 : #define __gen_imgIContainer_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.h"
11 : #endif
12 :
13 : #include "mozilla/Assertions.h"
14 : #include "mozilla/DebugOnly.h"
15 :
16 : /* For IDL files that don't want to include root IDL files. */
17 : #ifndef NS_NO_VTABLE
18 : #define NS_NO_VTABLE
19 : #endif
20 : #include "DrawResult.h"
21 : #include "gfxContext.h"
22 : #include "gfxMatrix.h"
23 : #include "gfxRect.h"
24 : #include "mozilla/gfx/2D.h"
25 : #include "mozilla/Maybe.h"
26 : #include "mozilla/RefPtr.h"
27 : #include "nsRect.h"
28 : #include "nsSize.h"
29 : #include "limits.h"
30 : class nsIDocument;
31 : namespace mozilla {
32 : namespace layers {
33 : class LayerManager;
34 : class ImageContainer;
35 : }
36 : }
37 : class nsIFrame;
38 : namespace mozilla {
39 : class TimeStamp;
40 : class SVGImageContext;
41 : }
42 : namespace mozilla {
43 : namespace image {
44 : class ImageRegion;
45 : struct Orientation;
46 : }
47 : }
48 :
49 : /* starting interface: imgIContainer */
50 : #define IMGICONTAINER_IID_STR "a8dbee24-ff86-4755-b40e-51175caf31af"
51 :
52 : #define IMGICONTAINER_IID \
53 : {0xa8dbee24, 0xff86, 0x4755, \
54 : { 0xb4, 0x0e, 0x51, 0x17, 0x5c, 0xaf, 0x31, 0xaf }}
55 :
56 97 : class imgIContainer : public nsISupports {
57 : public:
58 :
59 : NS_DECLARE_STATIC_IID_ACCESSOR(IMGICONTAINER_IID)
60 :
61 : /* readonly attribute int32_t width; */
62 : NS_IMETHOD GetWidth(int32_t *aWidth) = 0;
63 :
64 : /* readonly attribute int32_t height; */
65 : NS_IMETHOD GetHeight(int32_t *aHeight) = 0;
66 :
67 : /* [noscript] readonly attribute nsSize intrinsicSize; */
68 : NS_IMETHOD GetIntrinsicSize(nsSize *aIntrinsicSize) = 0;
69 :
70 : /* [noscript] readonly attribute nsSize intrinsicRatio; */
71 : NS_IMETHOD GetIntrinsicRatio(nsSize *aIntrinsicRatio) = 0;
72 :
73 : /* [nostdcall,notxpcom] nsIntSizeByVal optimalImageSizeForDest ([const] in gfxSize aDest, in uint32_t aWhichFrame, in SamplingFilter aSamplingFilter, in uint32_t aFlags); */
74 : virtual nsIntSize OptimalImageSizeForDest(const gfxSize & aDest, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, uint32_t aFlags) = 0;
75 :
76 : enum {
77 : TYPE_RASTER = 0U,
78 : TYPE_VECTOR = 1U
79 : };
80 :
81 : /* [infallible] readonly attribute unsigned short type; */
82 : NS_IMETHOD GetType(uint16_t *aType) = 0;
83 197 : inline uint16_t GetType()
84 : {
85 : uint16_t result;
86 394 : mozilla::DebugOnly<nsresult> rv = GetType(&result);
87 197 : MOZ_ASSERT(NS_SUCCEEDED(rv));
88 394 : return result;
89 : }
90 :
91 : /* readonly attribute boolean animated; */
92 : NS_IMETHOD GetAnimated(bool *aAnimated) = 0;
93 :
94 : enum {
95 : FLAG_NONE = 0U,
96 : FLAG_SYNC_DECODE = 1U,
97 : FLAG_SYNC_DECODE_IF_FAST = 2U,
98 : FLAG_ASYNC_NOTIFY = 4U,
99 : FLAG_DECODE_NO_PREMULTIPLY_ALPHA = 8U,
100 : FLAG_DECODE_NO_COLORSPACE_CONVERSION = 16U,
101 : FLAG_CLAMP = 32U,
102 : FLAG_HIGH_QUALITY_SCALING = 64U,
103 : FLAG_WANT_DATA_SURFACE = 128U,
104 : FLAG_BYPASS_SURFACE_CACHE = 256U,
105 : FLAG_FORCE_PRESERVEASPECTRATIO_NONE = 512U,
106 : FLAG_FORCE_UNIFORM_SCALING = 1024U,
107 : DECODE_FLAGS_DEFAULT = 0U,
108 : FRAME_FIRST = 0U,
109 : FRAME_CURRENT = 1U,
110 : FRAME_MAX_VALUE = 1U
111 : };
112 :
113 : /* [noscript,notxpcom] TempRefSourceSurface getFrame (in uint32_t aWhichFrame, in uint32_t aFlags); */
114 : NS_IMETHOD_(already_AddRefed<mozilla::gfx::SourceSurface>) GetFrame(uint32_t aWhichFrame, uint32_t aFlags) = 0;
115 :
116 : /* [noscript,notxpcom] TempRefSourceSurface getFrameAtSize ([const] in nsIntSize aSize, in uint32_t aWhichFrame, in uint32_t aFlags); */
117 : NS_IMETHOD_(already_AddRefed<mozilla::gfx::SourceSurface>) GetFrameAtSize(const nsIntSize & aSize, uint32_t aWhichFrame, uint32_t aFlags) = 0;
118 :
119 : /* [noscript,notxpcom] boolean willDrawOpaqueNow (); */
120 : NS_IMETHOD_(bool) WillDrawOpaqueNow(void) = 0;
121 :
122 : /* [noscript,notxpcom] boolean isImageContainerAvailable (in LayerManager aManager, in uint32_t aFlags); */
123 : NS_IMETHOD_(bool) IsImageContainerAvailable(mozilla::layers::LayerManager *aManager, uint32_t aFlags) = 0;
124 :
125 : /* [noscript,notxpcom] TempRefImageContainer getImageContainer (in LayerManager aManager, in uint32_t aFlags); */
126 : NS_IMETHOD_(already_AddRefed<mozilla::layers::ImageContainer>) GetImageContainer(mozilla::layers::LayerManager *aManager, uint32_t aFlags) = 0;
127 :
128 : /* [noscript,notxpcom] DrawResult draw (in gfxContext aContext, [const] in nsIntSize aSize, [const] in ImageRegion aRegion, in uint32_t aWhichFrame, in SamplingFilter aSamplingFilter, [const] in MaybeSVGImageContext aSVGContext, in uint32_t aFlags, in float aOpacity); */
129 : NS_IMETHOD_(mozilla::image::DrawResult) Draw(gfxContext *aContext, const nsIntSize & aSize, const mozilla::image::ImageRegion & aRegion, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, const mozilla::Maybe<mozilla::SVGImageContext> & aSVGContext, uint32_t aFlags, float aOpacity) = 0;
130 :
131 : /* [noscript] void startDecoding (in uint32_t aFlags); */
132 : NS_IMETHOD StartDecoding(uint32_t aFlags) = 0;
133 :
134 : /* [noscript,notxpcom] boolean startDecodingWithResult (in uint32_t aFlags); */
135 : NS_IMETHOD_(bool) StartDecodingWithResult(uint32_t aFlags) = 0;
136 :
137 : /* [noscript] void requestDecodeForSize ([const] in nsIntSize aSize, in uint32_t aFlags); */
138 : NS_IMETHOD RequestDecodeForSize(const nsIntSize & aSize, uint32_t aFlags) = 0;
139 :
140 : /* void lockImage (); */
141 : NS_IMETHOD LockImage(void) = 0;
142 :
143 : /* void unlockImage (); */
144 : NS_IMETHOD UnlockImage(void) = 0;
145 :
146 : /* void requestDiscard (); */
147 : NS_IMETHOD RequestDiscard(void) = 0;
148 :
149 : /* [notxpcom] void requestRefresh ([const] in TimeStamp aTime); */
150 : NS_IMETHOD_(void) RequestRefresh(const mozilla::TimeStamp & aTime) = 0;
151 :
152 : enum {
153 : kNormalAnimMode = 0,
154 : kDontAnimMode = 1,
155 : kLoopOnceAnimMode = 2
156 : };
157 :
158 : /* attribute unsigned short animationMode; */
159 : NS_IMETHOD GetAnimationMode(uint16_t *aAnimationMode) = 0;
160 : NS_IMETHOD SetAnimationMode(uint16_t aAnimationMode) = 0;
161 :
162 : /* void resetAnimation (); */
163 : NS_IMETHOD ResetAnimation(void) = 0;
164 :
165 : /* [notxpcom] float getFrameIndex (in uint32_t aWhichFrame); */
166 : NS_IMETHOD_(float) GetFrameIndex(uint32_t aWhichFrame) = 0;
167 :
168 : /* [notxpcom] Orientation getOrientation (); */
169 : NS_IMETHOD_(mozilla::image::Orientation) GetOrientation(void) = 0;
170 :
171 : /* [notxpcom] int32_t getFirstFrameDelay (); */
172 : NS_IMETHOD_(int32_t) GetFirstFrameDelay(void) = 0;
173 :
174 : /* [notxpcom] void setAnimationStartTime ([const] in TimeStamp aTime); */
175 : NS_IMETHOD_(void) SetAnimationStartTime(const mozilla::TimeStamp & aTime) = 0;
176 :
177 : /* [notxpcom] nsIntRectByVal getImageSpaceInvalidationRect ([const] in nsIntRect aRect); */
178 : NS_IMETHOD_(nsIntRect) GetImageSpaceInvalidationRect(const nsIntRect & aRect) = 0;
179 :
180 : /* [nostdcall,notxpcom] TempRefImgIContainer unwrap (); */
181 : virtual already_AddRefed<imgIContainer> Unwrap(void) = 0;
182 :
183 : /* [noscript,notxpcom] void propagateUseCounters (in nsIDocument aDocument); */
184 : NS_IMETHOD_(void) PropagateUseCounters(nsIDocument *aDocument) = 0;
185 :
186 : /*
187 : * Get the set of sizes the image can decode to natively.
188 : */
189 : virtual nsresult GetNativeSizes(nsTArray<nsIntSize>& aNativeSizes) const = 0;
190 : };
191 :
192 : NS_DEFINE_STATIC_IID_ACCESSOR(imgIContainer, IMGICONTAINER_IID)
193 :
194 : /* Use this macro when declaring classes that implement this interface. */
195 : #define NS_DECL_IMGICONTAINER \
196 : NS_IMETHOD GetWidth(int32_t *aWidth) override; \
197 : NS_IMETHOD GetHeight(int32_t *aHeight) override; \
198 : NS_IMETHOD GetIntrinsicSize(nsSize *aIntrinsicSize) override; \
199 : NS_IMETHOD GetIntrinsicRatio(nsSize *aIntrinsicRatio) override; \
200 : virtual nsIntSize OptimalImageSizeForDest(const gfxSize & aDest, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, uint32_t aFlags) override; \
201 : using imgIContainer::GetType; \
202 : NS_IMETHOD GetType(uint16_t *aType) override; \
203 : NS_IMETHOD GetAnimated(bool *aAnimated) override; \
204 : NS_IMETHOD_(already_AddRefed<mozilla::gfx::SourceSurface>) GetFrame(uint32_t aWhichFrame, uint32_t aFlags) override; \
205 : NS_IMETHOD_(already_AddRefed<mozilla::gfx::SourceSurface>) GetFrameAtSize(const nsIntSize & aSize, uint32_t aWhichFrame, uint32_t aFlags) override; \
206 : NS_IMETHOD_(bool) WillDrawOpaqueNow(void) override; \
207 : NS_IMETHOD_(bool) IsImageContainerAvailable(mozilla::layers::LayerManager *aManager, uint32_t aFlags) override; \
208 : NS_IMETHOD_(already_AddRefed<mozilla::layers::ImageContainer>) GetImageContainer(mozilla::layers::LayerManager *aManager, uint32_t aFlags) override; \
209 : NS_IMETHOD_(mozilla::image::DrawResult) Draw(gfxContext *aContext, const nsIntSize & aSize, const mozilla::image::ImageRegion & aRegion, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, const mozilla::Maybe<mozilla::SVGImageContext> & aSVGContext, uint32_t aFlags, float aOpacity) override; \
210 : NS_IMETHOD StartDecoding(uint32_t aFlags) override; \
211 : NS_IMETHOD_(bool) StartDecodingWithResult(uint32_t aFlags) override; \
212 : NS_IMETHOD RequestDecodeForSize(const nsIntSize & aSize, uint32_t aFlags) override; \
213 : NS_IMETHOD LockImage(void) override; \
214 : NS_IMETHOD UnlockImage(void) override; \
215 : NS_IMETHOD RequestDiscard(void) override; \
216 : NS_IMETHOD_(void) RequestRefresh(const mozilla::TimeStamp & aTime) override; \
217 : NS_IMETHOD GetAnimationMode(uint16_t *aAnimationMode) override; \
218 : NS_IMETHOD SetAnimationMode(uint16_t aAnimationMode) override; \
219 : NS_IMETHOD ResetAnimation(void) override; \
220 : NS_IMETHOD_(float) GetFrameIndex(uint32_t aWhichFrame) override; \
221 : NS_IMETHOD_(mozilla::image::Orientation) GetOrientation(void) override; \
222 : NS_IMETHOD_(int32_t) GetFirstFrameDelay(void) override; \
223 : NS_IMETHOD_(void) SetAnimationStartTime(const mozilla::TimeStamp & aTime) override; \
224 : NS_IMETHOD_(nsIntRect) GetImageSpaceInvalidationRect(const nsIntRect & aRect) override; \
225 : virtual already_AddRefed<imgIContainer> Unwrap(void) override; \
226 : NS_IMETHOD_(void) PropagateUseCounters(nsIDocument *aDocument) override; \
227 :
228 : /* Use this macro when declaring the members of this interface when the
229 : class doesn't implement the interface. This is useful for forwarding. */
230 : #define NS_DECL_NON_VIRTUAL_IMGICONTAINER \
231 : nsresult GetWidth(int32_t *aWidth); \
232 : nsresult GetHeight(int32_t *aHeight); \
233 : nsresult GetIntrinsicSize(nsSize *aIntrinsicSize); \
234 : nsresult GetIntrinsicRatio(nsSize *aIntrinsicRatio); \
235 : nsIntSize OptimalImageSizeForDest(const gfxSize & aDest, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, uint32_t aFlags); \
236 : using imgIContainer::GetType; \
237 : nsresult GetType(uint16_t *aType); \
238 : nsresult GetAnimated(bool *aAnimated); \
239 : nsresult_(already_AddRefed<mozilla::gfx::SourceSurface>) GetFrame(uint32_t aWhichFrame, uint32_t aFlags); \
240 : nsresult_(already_AddRefed<mozilla::gfx::SourceSurface>) GetFrameAtSize(const nsIntSize & aSize, uint32_t aWhichFrame, uint32_t aFlags); \
241 : nsresult_(bool) WillDrawOpaqueNow(void); \
242 : nsresult_(bool) IsImageContainerAvailable(mozilla::layers::LayerManager *aManager, uint32_t aFlags); \
243 : nsresult_(already_AddRefed<mozilla::layers::ImageContainer>) GetImageContainer(mozilla::layers::LayerManager *aManager, uint32_t aFlags); \
244 : nsresult_(mozilla::image::DrawResult) Draw(gfxContext *aContext, const nsIntSize & aSize, const mozilla::image::ImageRegion & aRegion, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, const mozilla::Maybe<mozilla::SVGImageContext> & aSVGContext, uint32_t aFlags, float aOpacity); \
245 : nsresult StartDecoding(uint32_t aFlags); \
246 : nsresult_(bool) StartDecodingWithResult(uint32_t aFlags); \
247 : nsresult RequestDecodeForSize(const nsIntSize & aSize, uint32_t aFlags); \
248 : nsresult LockImage(void); \
249 : nsresult UnlockImage(void); \
250 : nsresult RequestDiscard(void); \
251 : nsresult_(void) RequestRefresh(const mozilla::TimeStamp & aTime); \
252 : nsresult GetAnimationMode(uint16_t *aAnimationMode); \
253 : nsresult SetAnimationMode(uint16_t aAnimationMode); \
254 : nsresult ResetAnimation(void); \
255 : nsresult_(float) GetFrameIndex(uint32_t aWhichFrame); \
256 : nsresult_(mozilla::image::Orientation) GetOrientation(void); \
257 : nsresult_(int32_t) GetFirstFrameDelay(void); \
258 : nsresult_(void) SetAnimationStartTime(const mozilla::TimeStamp & aTime); \
259 : nsresult_(nsIntRect) GetImageSpaceInvalidationRect(const nsIntRect & aRect); \
260 : already_AddRefed<imgIContainer> Unwrap(void); \
261 : nsresult_(void) PropagateUseCounters(nsIDocument *aDocument); \
262 :
263 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
264 : #define NS_FORWARD_IMGICONTAINER(_to) \
265 : NS_IMETHOD GetWidth(int32_t *aWidth) override { return _to GetWidth(aWidth); } \
266 : NS_IMETHOD GetHeight(int32_t *aHeight) override { return _to GetHeight(aHeight); } \
267 : NS_IMETHOD GetIntrinsicSize(nsSize *aIntrinsicSize) override { return _to GetIntrinsicSize(aIntrinsicSize); } \
268 : NS_IMETHOD GetIntrinsicRatio(nsSize *aIntrinsicRatio) override { return _to GetIntrinsicRatio(aIntrinsicRatio); } \
269 : virtual nsIntSize OptimalImageSizeForDest(const gfxSize & aDest, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, uint32_t aFlags) override { return _to OptimalImageSizeForDest(aDest, aWhichFrame, aSamplingFilter, aFlags); } \
270 : using imgIContainer::GetType; \
271 : NS_IMETHOD GetType(uint16_t *aType) override { return _to GetType(aType); } \
272 : NS_IMETHOD GetAnimated(bool *aAnimated) override { return _to GetAnimated(aAnimated); } \
273 : NS_IMETHOD_(already_AddRefed<mozilla::gfx::SourceSurface>) GetFrame(uint32_t aWhichFrame, uint32_t aFlags) override { return _to GetFrame(aWhichFrame, aFlags); } \
274 : NS_IMETHOD_(already_AddRefed<mozilla::gfx::SourceSurface>) GetFrameAtSize(const nsIntSize & aSize, uint32_t aWhichFrame, uint32_t aFlags) override { return _to GetFrameAtSize(aSize, aWhichFrame, aFlags); } \
275 : NS_IMETHOD_(bool) WillDrawOpaqueNow(void) override { return _to WillDrawOpaqueNow(); } \
276 : NS_IMETHOD_(bool) IsImageContainerAvailable(mozilla::layers::LayerManager *aManager, uint32_t aFlags) override { return _to IsImageContainerAvailable(aManager, aFlags); } \
277 : NS_IMETHOD_(already_AddRefed<mozilla::layers::ImageContainer>) GetImageContainer(mozilla::layers::LayerManager *aManager, uint32_t aFlags) override { return _to GetImageContainer(aManager, aFlags); } \
278 : NS_IMETHOD_(mozilla::image::DrawResult) Draw(gfxContext *aContext, const nsIntSize & aSize, const mozilla::image::ImageRegion & aRegion, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, const mozilla::Maybe<mozilla::SVGImageContext> & aSVGContext, uint32_t aFlags, float aOpacity) override { return _to Draw(aContext, aSize, aRegion, aWhichFrame, aSamplingFilter, aSVGContext, aFlags, aOpacity); } \
279 : NS_IMETHOD StartDecoding(uint32_t aFlags) override { return _to StartDecoding(aFlags); } \
280 : NS_IMETHOD_(bool) StartDecodingWithResult(uint32_t aFlags) override { return _to StartDecodingWithResult(aFlags); } \
281 : NS_IMETHOD RequestDecodeForSize(const nsIntSize & aSize, uint32_t aFlags) override { return _to RequestDecodeForSize(aSize, aFlags); } \
282 : NS_IMETHOD LockImage(void) override { return _to LockImage(); } \
283 : NS_IMETHOD UnlockImage(void) override { return _to UnlockImage(); } \
284 : NS_IMETHOD RequestDiscard(void) override { return _to RequestDiscard(); } \
285 : NS_IMETHOD_(void) RequestRefresh(const mozilla::TimeStamp & aTime) override { return _to RequestRefresh(aTime); } \
286 : NS_IMETHOD GetAnimationMode(uint16_t *aAnimationMode) override { return _to GetAnimationMode(aAnimationMode); } \
287 : NS_IMETHOD SetAnimationMode(uint16_t aAnimationMode) override { return _to SetAnimationMode(aAnimationMode); } \
288 : NS_IMETHOD ResetAnimation(void) override { return _to ResetAnimation(); } \
289 : NS_IMETHOD_(float) GetFrameIndex(uint32_t aWhichFrame) override { return _to GetFrameIndex(aWhichFrame); } \
290 : NS_IMETHOD_(mozilla::image::Orientation) GetOrientation(void) override { return _to GetOrientation(); } \
291 : NS_IMETHOD_(int32_t) GetFirstFrameDelay(void) override { return _to GetFirstFrameDelay(); } \
292 : NS_IMETHOD_(void) SetAnimationStartTime(const mozilla::TimeStamp & aTime) override { return _to SetAnimationStartTime(aTime); } \
293 : NS_IMETHOD_(nsIntRect) GetImageSpaceInvalidationRect(const nsIntRect & aRect) override { return _to GetImageSpaceInvalidationRect(aRect); } \
294 : virtual already_AddRefed<imgIContainer> Unwrap(void) override { return _to Unwrap(); } \
295 : NS_IMETHOD_(void) PropagateUseCounters(nsIDocument *aDocument) override { return _to PropagateUseCounters(aDocument); } \
296 :
297 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
298 : #define NS_FORWARD_SAFE_IMGICONTAINER(_to) \
299 : NS_IMETHOD GetWidth(int32_t *aWidth) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWidth(aWidth); } \
300 : NS_IMETHOD GetHeight(int32_t *aHeight) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHeight(aHeight); } \
301 : NS_IMETHOD GetIntrinsicSize(nsSize *aIntrinsicSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIntrinsicSize(aIntrinsicSize); } \
302 : NS_IMETHOD GetIntrinsicRatio(nsSize *aIntrinsicRatio) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIntrinsicRatio(aIntrinsicRatio); } \
303 : virtual nsIntSize OptimalImageSizeForDest(const gfxSize & aDest, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, uint32_t aFlags) override; \
304 : NS_IMETHOD GetType(uint16_t *aType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \
305 : NS_IMETHOD GetAnimated(bool *aAnimated) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAnimated(aAnimated); } \
306 : NS_IMETHOD_(already_AddRefed<mozilla::gfx::SourceSurface>) GetFrame(uint32_t aWhichFrame, uint32_t aFlags) override; \
307 : NS_IMETHOD_(already_AddRefed<mozilla::gfx::SourceSurface>) GetFrameAtSize(const nsIntSize & aSize, uint32_t aWhichFrame, uint32_t aFlags) override; \
308 : NS_IMETHOD_(bool) WillDrawOpaqueNow(void) override; \
309 : NS_IMETHOD_(bool) IsImageContainerAvailable(mozilla::layers::LayerManager *aManager, uint32_t aFlags) override; \
310 : NS_IMETHOD_(already_AddRefed<mozilla::layers::ImageContainer>) GetImageContainer(mozilla::layers::LayerManager *aManager, uint32_t aFlags) override; \
311 : NS_IMETHOD_(mozilla::image::DrawResult) Draw(gfxContext *aContext, const nsIntSize & aSize, const mozilla::image::ImageRegion & aRegion, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, const mozilla::Maybe<mozilla::SVGImageContext> & aSVGContext, uint32_t aFlags, float aOpacity) override; \
312 : NS_IMETHOD StartDecoding(uint32_t aFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->StartDecoding(aFlags); } \
313 : NS_IMETHOD_(bool) StartDecodingWithResult(uint32_t aFlags) override; \
314 : NS_IMETHOD RequestDecodeForSize(const nsIntSize & aSize, uint32_t aFlags) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RequestDecodeForSize(aSize, aFlags); } \
315 : NS_IMETHOD LockImage(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->LockImage(); } \
316 : NS_IMETHOD UnlockImage(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UnlockImage(); } \
317 : NS_IMETHOD RequestDiscard(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RequestDiscard(); } \
318 : NS_IMETHOD_(void) RequestRefresh(const mozilla::TimeStamp & aTime) override; \
319 : NS_IMETHOD GetAnimationMode(uint16_t *aAnimationMode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAnimationMode(aAnimationMode); } \
320 : NS_IMETHOD SetAnimationMode(uint16_t aAnimationMode) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAnimationMode(aAnimationMode); } \
321 : NS_IMETHOD ResetAnimation(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ResetAnimation(); } \
322 : NS_IMETHOD_(float) GetFrameIndex(uint32_t aWhichFrame) override; \
323 : NS_IMETHOD_(mozilla::image::Orientation) GetOrientation(void) override; \
324 : NS_IMETHOD_(int32_t) GetFirstFrameDelay(void) override; \
325 : NS_IMETHOD_(void) SetAnimationStartTime(const mozilla::TimeStamp & aTime) override; \
326 : NS_IMETHOD_(nsIntRect) GetImageSpaceInvalidationRect(const nsIntRect & aRect) override; \
327 : virtual already_AddRefed<imgIContainer> Unwrap(void) override; \
328 : NS_IMETHOD_(void) PropagateUseCounters(nsIDocument *aDocument) override; \
329 :
330 : #if 0
331 : /* Use the code below as a template for the implementation class for this interface. */
332 :
333 : /* Header file */
334 : class _MYCLASS_ : public imgIContainer
335 : {
336 : public:
337 : NS_DECL_ISUPPORTS
338 : NS_DECL_IMGICONTAINER
339 :
340 : _MYCLASS_();
341 :
342 : private:
343 : ~_MYCLASS_();
344 :
345 : protected:
346 : /* additional members */
347 : };
348 :
349 : /* Implementation file */
350 : NS_IMPL_ISUPPORTS(_MYCLASS_, imgIContainer)
351 :
352 : _MYCLASS_::_MYCLASS_()
353 : {
354 : /* member initializers and constructor code */
355 : }
356 :
357 : _MYCLASS_::~_MYCLASS_()
358 : {
359 : /* destructor code */
360 : }
361 :
362 : /* readonly attribute int32_t width; */
363 : NS_IMETHODIMP _MYCLASS_::GetWidth(int32_t *aWidth)
364 : {
365 : return NS_ERROR_NOT_IMPLEMENTED;
366 : }
367 :
368 : /* readonly attribute int32_t height; */
369 : NS_IMETHODIMP _MYCLASS_::GetHeight(int32_t *aHeight)
370 : {
371 : return NS_ERROR_NOT_IMPLEMENTED;
372 : }
373 :
374 : /* [noscript] readonly attribute nsSize intrinsicSize; */
375 : NS_IMETHODIMP _MYCLASS_::GetIntrinsicSize(nsSize *aIntrinsicSize)
376 : {
377 : return NS_ERROR_NOT_IMPLEMENTED;
378 : }
379 :
380 : /* [noscript] readonly attribute nsSize intrinsicRatio; */
381 : NS_IMETHODIMP _MYCLASS_::GetIntrinsicRatio(nsSize *aIntrinsicRatio)
382 : {
383 : return NS_ERROR_NOT_IMPLEMENTED;
384 : }
385 :
386 : /* [nostdcall,notxpcom] nsIntSizeByVal optimalImageSizeForDest ([const] in gfxSize aDest, in uint32_t aWhichFrame, in SamplingFilter aSamplingFilter, in uint32_t aFlags); */
387 : nsIntSize _MYCLASS_::OptimalImageSizeForDest(const gfxSize & aDest, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, uint32_t aFlags)
388 : {
389 : return NS_ERROR_NOT_IMPLEMENTED;
390 : }
391 :
392 : /* [infallible] readonly attribute unsigned short type; */
393 : NS_IMETHODIMP _MYCLASS_::GetType(uint16_t *aType)
394 : {
395 : return NS_ERROR_NOT_IMPLEMENTED;
396 : }
397 :
398 : /* readonly attribute boolean animated; */
399 : NS_IMETHODIMP _MYCLASS_::GetAnimated(bool *aAnimated)
400 : {
401 : return NS_ERROR_NOT_IMPLEMENTED;
402 : }
403 :
404 : /* [noscript,notxpcom] TempRefSourceSurface getFrame (in uint32_t aWhichFrame, in uint32_t aFlags); */
405 : NS_IMETHODIMP_(already_AddRefed<mozilla::gfx::SourceSurface>) _MYCLASS_::GetFrame(uint32_t aWhichFrame, uint32_t aFlags)
406 : {
407 : return NS_ERROR_NOT_IMPLEMENTED;
408 : }
409 :
410 : /* [noscript,notxpcom] TempRefSourceSurface getFrameAtSize ([const] in nsIntSize aSize, in uint32_t aWhichFrame, in uint32_t aFlags); */
411 : NS_IMETHODIMP_(already_AddRefed<mozilla::gfx::SourceSurface>) _MYCLASS_::GetFrameAtSize(const nsIntSize & aSize, uint32_t aWhichFrame, uint32_t aFlags)
412 : {
413 : return NS_ERROR_NOT_IMPLEMENTED;
414 : }
415 :
416 : /* [noscript,notxpcom] boolean willDrawOpaqueNow (); */
417 : NS_IMETHODIMP_(bool) _MYCLASS_::WillDrawOpaqueNow()
418 : {
419 : return NS_ERROR_NOT_IMPLEMENTED;
420 : }
421 :
422 : /* [noscript,notxpcom] boolean isImageContainerAvailable (in LayerManager aManager, in uint32_t aFlags); */
423 : NS_IMETHODIMP_(bool) _MYCLASS_::IsImageContainerAvailable(mozilla::layers::LayerManager *aManager, uint32_t aFlags)
424 : {
425 : return NS_ERROR_NOT_IMPLEMENTED;
426 : }
427 :
428 : /* [noscript,notxpcom] TempRefImageContainer getImageContainer (in LayerManager aManager, in uint32_t aFlags); */
429 : NS_IMETHODIMP_(already_AddRefed<mozilla::layers::ImageContainer>) _MYCLASS_::GetImageContainer(mozilla::layers::LayerManager *aManager, uint32_t aFlags)
430 : {
431 : return NS_ERROR_NOT_IMPLEMENTED;
432 : }
433 :
434 : /* [noscript,notxpcom] DrawResult draw (in gfxContext aContext, [const] in nsIntSize aSize, [const] in ImageRegion aRegion, in uint32_t aWhichFrame, in SamplingFilter aSamplingFilter, [const] in MaybeSVGImageContext aSVGContext, in uint32_t aFlags, in float aOpacity); */
435 : NS_IMETHODIMP_(mozilla::image::DrawResult) _MYCLASS_::Draw(gfxContext *aContext, const nsIntSize & aSize, const mozilla::image::ImageRegion & aRegion, uint32_t aWhichFrame, mozilla::gfx::SamplingFilter aSamplingFilter, const mozilla::Maybe<mozilla::SVGImageContext> & aSVGContext, uint32_t aFlags, float aOpacity)
436 : {
437 : return NS_ERROR_NOT_IMPLEMENTED;
438 : }
439 :
440 : /* [noscript] void startDecoding (in uint32_t aFlags); */
441 : NS_IMETHODIMP _MYCLASS_::StartDecoding(uint32_t aFlags)
442 : {
443 : return NS_ERROR_NOT_IMPLEMENTED;
444 : }
445 :
446 : /* [noscript,notxpcom] boolean startDecodingWithResult (in uint32_t aFlags); */
447 : NS_IMETHODIMP_(bool) _MYCLASS_::StartDecodingWithResult(uint32_t aFlags)
448 : {
449 : return NS_ERROR_NOT_IMPLEMENTED;
450 : }
451 :
452 : /* [noscript] void requestDecodeForSize ([const] in nsIntSize aSize, in uint32_t aFlags); */
453 : NS_IMETHODIMP _MYCLASS_::RequestDecodeForSize(const nsIntSize & aSize, uint32_t aFlags)
454 : {
455 : return NS_ERROR_NOT_IMPLEMENTED;
456 : }
457 :
458 : /* void lockImage (); */
459 : NS_IMETHODIMP _MYCLASS_::LockImage()
460 : {
461 : return NS_ERROR_NOT_IMPLEMENTED;
462 : }
463 :
464 : /* void unlockImage (); */
465 : NS_IMETHODIMP _MYCLASS_::UnlockImage()
466 : {
467 : return NS_ERROR_NOT_IMPLEMENTED;
468 : }
469 :
470 : /* void requestDiscard (); */
471 : NS_IMETHODIMP _MYCLASS_::RequestDiscard()
472 : {
473 : return NS_ERROR_NOT_IMPLEMENTED;
474 : }
475 :
476 : /* [notxpcom] void requestRefresh ([const] in TimeStamp aTime); */
477 : NS_IMETHODIMP_(void) _MYCLASS_::RequestRefresh(const mozilla::TimeStamp & aTime)
478 : {
479 : return NS_ERROR_NOT_IMPLEMENTED;
480 : }
481 :
482 : /* attribute unsigned short animationMode; */
483 : NS_IMETHODIMP _MYCLASS_::GetAnimationMode(uint16_t *aAnimationMode)
484 : {
485 : return NS_ERROR_NOT_IMPLEMENTED;
486 : }
487 : NS_IMETHODIMP _MYCLASS_::SetAnimationMode(uint16_t aAnimationMode)
488 : {
489 : return NS_ERROR_NOT_IMPLEMENTED;
490 : }
491 :
492 : /* void resetAnimation (); */
493 : NS_IMETHODIMP _MYCLASS_::ResetAnimation()
494 : {
495 : return NS_ERROR_NOT_IMPLEMENTED;
496 : }
497 :
498 : /* [notxpcom] float getFrameIndex (in uint32_t aWhichFrame); */
499 : NS_IMETHODIMP_(float) _MYCLASS_::GetFrameIndex(uint32_t aWhichFrame)
500 : {
501 : return NS_ERROR_NOT_IMPLEMENTED;
502 : }
503 :
504 : /* [notxpcom] Orientation getOrientation (); */
505 : NS_IMETHODIMP_(mozilla::image::Orientation) _MYCLASS_::GetOrientation()
506 : {
507 : return NS_ERROR_NOT_IMPLEMENTED;
508 : }
509 :
510 : /* [notxpcom] int32_t getFirstFrameDelay (); */
511 : NS_IMETHODIMP_(int32_t) _MYCLASS_::GetFirstFrameDelay()
512 : {
513 : return NS_ERROR_NOT_IMPLEMENTED;
514 : }
515 :
516 : /* [notxpcom] void setAnimationStartTime ([const] in TimeStamp aTime); */
517 : NS_IMETHODIMP_(void) _MYCLASS_::SetAnimationStartTime(const mozilla::TimeStamp & aTime)
518 : {
519 : return NS_ERROR_NOT_IMPLEMENTED;
520 : }
521 :
522 : /* [notxpcom] nsIntRectByVal getImageSpaceInvalidationRect ([const] in nsIntRect aRect); */
523 : NS_IMETHODIMP_(nsIntRect) _MYCLASS_::GetImageSpaceInvalidationRect(const nsIntRect & aRect)
524 : {
525 : return NS_ERROR_NOT_IMPLEMENTED;
526 : }
527 :
528 : /* [nostdcall,notxpcom] TempRefImgIContainer unwrap (); */
529 : already_AddRefed<imgIContainer> _MYCLASS_::Unwrap()
530 : {
531 : return NS_ERROR_NOT_IMPLEMENTED;
532 : }
533 :
534 : /* [noscript,notxpcom] void propagateUseCounters (in nsIDocument aDocument); */
535 : NS_IMETHODIMP_(void) _MYCLASS_::PropagateUseCounters(nsIDocument *aDocument)
536 : {
537 : return NS_ERROR_NOT_IMPLEMENTED;
538 : }
539 :
540 : /* End of implementation class template. */
541 : #endif
542 :
543 :
544 : #endif /* __gen_imgIContainer_h__ */
|