Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIImageLoadingContent.idl
3 : */
4 :
5 : #ifndef __gen_nsIImageLoadingContent_h__
6 : #define __gen_nsIImageLoadingContent_h__
7 :
8 :
9 : #ifndef __gen_imgINotificationObserver_h__
10 : #include "imgINotificationObserver.h"
11 : #endif
12 :
13 : /* For IDL files that don't want to include root IDL files. */
14 : #ifndef NS_NO_VTABLE
15 : #define NS_NO_VTABLE
16 : #endif
17 : #include "mozilla/Maybe.h"
18 : #include "Visibility.h"
19 : class imgIRequest; /* forward declaration */
20 :
21 : class nsIChannel; /* forward declaration */
22 :
23 : class nsIStreamListener; /* forward declaration */
24 :
25 : class nsIURI; /* forward declaration */
26 :
27 : class nsIDocument; /* forward declaration */
28 :
29 : class nsIFrame; /* forward declaration */
30 :
31 :
32 : /* starting interface: nsIImageLoadingContent */
33 : #define NS_IIMAGELOADINGCONTENT_IID_STR "0357123d-9224-4d12-a47e-868c32689777"
34 :
35 : #define NS_IIMAGELOADINGCONTENT_IID \
36 : {0x0357123d, 0x9224, 0x4d12, \
37 : { 0xa4, 0x7e, 0x86, 0x8c, 0x32, 0x68, 0x97, 0x77 }}
38 :
39 11 : class NS_NO_VTABLE nsIImageLoadingContent : public imgINotificationObserver {
40 : public:
41 :
42 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IIMAGELOADINGCONTENT_IID)
43 :
44 : enum {
45 : UNKNOWN_REQUEST = -1,
46 : CURRENT_REQUEST = 0,
47 : PENDING_REQUEST = 1
48 : };
49 :
50 : /* attribute boolean loadingEnabled; */
51 : NS_IMETHOD GetLoadingEnabled(bool *aLoadingEnabled) = 0;
52 : NS_IMETHOD SetLoadingEnabled(bool aLoadingEnabled) = 0;
53 :
54 : /* readonly attribute short imageBlockingStatus; */
55 : NS_IMETHOD GetImageBlockingStatus(int16_t *aImageBlockingStatus) = 0;
56 :
57 : /* void addObserver (in imgINotificationObserver aObserver); */
58 : NS_IMETHOD AddObserver(imgINotificationObserver *aObserver) = 0;
59 :
60 : /* void removeObserver (in imgINotificationObserver aObserver); */
61 : NS_IMETHOD RemoveObserver(imgINotificationObserver *aObserver) = 0;
62 :
63 : /* imgIRequest getRequest (in long aRequestType); */
64 : NS_IMETHOD GetRequest(int32_t aRequestType, imgIRequest * *_retval) = 0;
65 :
66 : /* void setBlockedRequest (in int16_t aContentDecision); */
67 : NS_IMETHOD SetBlockedRequest(int16_t aContentDecision) = 0;
68 :
69 : /* [noscript,notxpcom] boolean currentRequestHasSize (); */
70 : NS_IMETHOD_(bool) CurrentRequestHasSize(void) = 0;
71 :
72 : /* [notxpcom] void frameCreated (in nsIFrame aFrame); */
73 : NS_IMETHOD_(void) FrameCreated(nsIFrame *aFrame) = 0;
74 :
75 : /* [notxpcom] void frameDestroyed (in nsIFrame aFrame); */
76 : NS_IMETHOD_(void) FrameDestroyed(nsIFrame *aFrame) = 0;
77 :
78 : /* long getRequestType (in imgIRequest aRequest); */
79 : NS_IMETHOD GetRequestType(imgIRequest *aRequest, int32_t *_retval) = 0;
80 :
81 : /* readonly attribute nsIURI currentURI; */
82 : NS_IMETHOD GetCurrentURI(nsIURI * *aCurrentURI) = 0;
83 :
84 : /* nsIStreamListener loadImageWithChannel (in nsIChannel aChannel); */
85 : NS_IMETHOD LoadImageWithChannel(nsIChannel *aChannel, nsIStreamListener * *_retval) = 0;
86 :
87 : /* [optional_argc] void forceReload ([optional] in boolean aNotify); */
88 : NS_IMETHOD ForceReload(bool aNotify, uint8_t _argc) = 0;
89 :
90 : /* void forceImageState (in boolean aForce, in unsigned long long aState); */
91 : NS_IMETHOD ForceImageState(bool aForce, uint64_t aState) = 0;
92 :
93 : /* readonly attribute unsigned long naturalWidth; */
94 : NS_IMETHOD GetNaturalWidth(uint32_t *aNaturalWidth) = 0;
95 :
96 : /* readonly attribute unsigned long naturalHeight; */
97 : NS_IMETHOD GetNaturalHeight(uint32_t *aNaturalHeight) = 0;
98 :
99 : /* [noscript,notxpcom] void onVisibilityChange (in Visibility aNewVisibility, in MaybeOnNonvisible aNonvisibleAction); */
100 : NS_IMETHOD_(void) OnVisibilityChange(mozilla::Visibility aNewVisibility, const mozilla::Maybe<mozilla::OnNonvisible> & aNonvisibleAction) = 0;
101 :
102 : };
103 :
104 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIImageLoadingContent, NS_IIMAGELOADINGCONTENT_IID)
105 :
106 : /* Use this macro when declaring classes that implement this interface. */
107 : #define NS_DECL_NSIIMAGELOADINGCONTENT \
108 : NS_IMETHOD GetLoadingEnabled(bool *aLoadingEnabled) override; \
109 : NS_IMETHOD SetLoadingEnabled(bool aLoadingEnabled) override; \
110 : NS_IMETHOD GetImageBlockingStatus(int16_t *aImageBlockingStatus) override; \
111 : NS_IMETHOD AddObserver(imgINotificationObserver *aObserver) override; \
112 : NS_IMETHOD RemoveObserver(imgINotificationObserver *aObserver) override; \
113 : NS_IMETHOD GetRequest(int32_t aRequestType, imgIRequest * *_retval) override; \
114 : NS_IMETHOD SetBlockedRequest(int16_t aContentDecision) override; \
115 : NS_IMETHOD_(bool) CurrentRequestHasSize(void) override; \
116 : NS_IMETHOD_(void) FrameCreated(nsIFrame *aFrame) override; \
117 : NS_IMETHOD_(void) FrameDestroyed(nsIFrame *aFrame) override; \
118 : NS_IMETHOD GetRequestType(imgIRequest *aRequest, int32_t *_retval) override; \
119 : NS_IMETHOD GetCurrentURI(nsIURI * *aCurrentURI) override; \
120 : NS_IMETHOD LoadImageWithChannel(nsIChannel *aChannel, nsIStreamListener * *_retval) override; \
121 : NS_IMETHOD ForceReload(bool aNotify, uint8_t _argc) override; \
122 : NS_IMETHOD ForceImageState(bool aForce, uint64_t aState) override; \
123 : NS_IMETHOD GetNaturalWidth(uint32_t *aNaturalWidth) override; \
124 : NS_IMETHOD GetNaturalHeight(uint32_t *aNaturalHeight) override; \
125 : NS_IMETHOD_(void) OnVisibilityChange(mozilla::Visibility aNewVisibility, const mozilla::Maybe<mozilla::OnNonvisible> & aNonvisibleAction) override;
126 :
127 : /* Use this macro when declaring the members of this interface when the
128 : class doesn't implement the interface. This is useful for forwarding. */
129 : #define NS_DECL_NON_VIRTUAL_NSIIMAGELOADINGCONTENT \
130 : nsresult GetLoadingEnabled(bool *aLoadingEnabled); \
131 : nsresult SetLoadingEnabled(bool aLoadingEnabled); \
132 : nsresult GetImageBlockingStatus(int16_t *aImageBlockingStatus); \
133 : nsresult AddObserver(imgINotificationObserver *aObserver); \
134 : nsresult RemoveObserver(imgINotificationObserver *aObserver); \
135 : nsresult GetRequest(int32_t aRequestType, imgIRequest * *_retval); \
136 : nsresult SetBlockedRequest(int16_t aContentDecision); \
137 : nsresult_(bool) CurrentRequestHasSize(void); \
138 : nsresult_(void) FrameCreated(nsIFrame *aFrame); \
139 : nsresult_(void) FrameDestroyed(nsIFrame *aFrame); \
140 : nsresult GetRequestType(imgIRequest *aRequest, int32_t *_retval); \
141 : nsresult GetCurrentURI(nsIURI * *aCurrentURI); \
142 : nsresult LoadImageWithChannel(nsIChannel *aChannel, nsIStreamListener * *_retval); \
143 : nsresult ForceReload(bool aNotify, uint8_t _argc); \
144 : nsresult ForceImageState(bool aForce, uint64_t aState); \
145 : nsresult GetNaturalWidth(uint32_t *aNaturalWidth); \
146 : nsresult GetNaturalHeight(uint32_t *aNaturalHeight); \
147 : nsresult_(void) OnVisibilityChange(mozilla::Visibility aNewVisibility, const mozilla::Maybe<mozilla::OnNonvisible> & aNonvisibleAction);
148 :
149 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
150 : #define NS_FORWARD_NSIIMAGELOADINGCONTENT(_to) \
151 : NS_IMETHOD GetLoadingEnabled(bool *aLoadingEnabled) override { return _to GetLoadingEnabled(aLoadingEnabled); } \
152 : NS_IMETHOD SetLoadingEnabled(bool aLoadingEnabled) override { return _to SetLoadingEnabled(aLoadingEnabled); } \
153 : NS_IMETHOD GetImageBlockingStatus(int16_t *aImageBlockingStatus) override { return _to GetImageBlockingStatus(aImageBlockingStatus); } \
154 : NS_IMETHOD AddObserver(imgINotificationObserver *aObserver) override { return _to AddObserver(aObserver); } \
155 : NS_IMETHOD RemoveObserver(imgINotificationObserver *aObserver) override { return _to RemoveObserver(aObserver); } \
156 : NS_IMETHOD GetRequest(int32_t aRequestType, imgIRequest * *_retval) override { return _to GetRequest(aRequestType, _retval); } \
157 : NS_IMETHOD SetBlockedRequest(int16_t aContentDecision) override { return _to SetBlockedRequest(aContentDecision); } \
158 : NS_IMETHOD_(bool) CurrentRequestHasSize(void) override { return _to CurrentRequestHasSize(); } \
159 : NS_IMETHOD_(void) FrameCreated(nsIFrame *aFrame) override { return _to FrameCreated(aFrame); } \
160 : NS_IMETHOD_(void) FrameDestroyed(nsIFrame *aFrame) override { return _to FrameDestroyed(aFrame); } \
161 : NS_IMETHOD GetRequestType(imgIRequest *aRequest, int32_t *_retval) override { return _to GetRequestType(aRequest, _retval); } \
162 : NS_IMETHOD GetCurrentURI(nsIURI * *aCurrentURI) override { return _to GetCurrentURI(aCurrentURI); } \
163 : NS_IMETHOD LoadImageWithChannel(nsIChannel *aChannel, nsIStreamListener * *_retval) override { return _to LoadImageWithChannel(aChannel, _retval); } \
164 : NS_IMETHOD ForceReload(bool aNotify, uint8_t _argc) override { return _to ForceReload(aNotify, _argc); } \
165 : NS_IMETHOD ForceImageState(bool aForce, uint64_t aState) override { return _to ForceImageState(aForce, aState); } \
166 : NS_IMETHOD GetNaturalWidth(uint32_t *aNaturalWidth) override { return _to GetNaturalWidth(aNaturalWidth); } \
167 : NS_IMETHOD GetNaturalHeight(uint32_t *aNaturalHeight) override { return _to GetNaturalHeight(aNaturalHeight); } \
168 : NS_IMETHOD_(void) OnVisibilityChange(mozilla::Visibility aNewVisibility, const mozilla::Maybe<mozilla::OnNonvisible> & aNonvisibleAction) override { return _to OnVisibilityChange(aNewVisibility, aNonvisibleAction); }
169 :
170 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
171 : #define NS_FORWARD_SAFE_NSIIMAGELOADINGCONTENT(_to) \
172 : NS_IMETHOD GetLoadingEnabled(bool *aLoadingEnabled) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLoadingEnabled(aLoadingEnabled); } \
173 : NS_IMETHOD SetLoadingEnabled(bool aLoadingEnabled) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetLoadingEnabled(aLoadingEnabled); } \
174 : NS_IMETHOD GetImageBlockingStatus(int16_t *aImageBlockingStatus) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetImageBlockingStatus(aImageBlockingStatus); } \
175 : NS_IMETHOD AddObserver(imgINotificationObserver *aObserver) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddObserver(aObserver); } \
176 : NS_IMETHOD RemoveObserver(imgINotificationObserver *aObserver) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveObserver(aObserver); } \
177 : NS_IMETHOD GetRequest(int32_t aRequestType, imgIRequest * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequest(aRequestType, _retval); } \
178 : NS_IMETHOD SetBlockedRequest(int16_t aContentDecision) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetBlockedRequest(aContentDecision); } \
179 : NS_IMETHOD_(bool) CurrentRequestHasSize(void) override; \
180 : NS_IMETHOD_(void) FrameCreated(nsIFrame *aFrame) override; \
181 : NS_IMETHOD_(void) FrameDestroyed(nsIFrame *aFrame) override; \
182 : NS_IMETHOD GetRequestType(imgIRequest *aRequest, int32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequestType(aRequest, _retval); } \
183 : NS_IMETHOD GetCurrentURI(nsIURI * *aCurrentURI) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentURI(aCurrentURI); } \
184 : NS_IMETHOD LoadImageWithChannel(nsIChannel *aChannel, nsIStreamListener * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadImageWithChannel(aChannel, _retval); } \
185 : NS_IMETHOD ForceReload(bool aNotify, uint8_t _argc) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ForceReload(aNotify, _argc); } \
186 : NS_IMETHOD ForceImageState(bool aForce, uint64_t aState) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ForceImageState(aForce, aState); } \
187 : NS_IMETHOD GetNaturalWidth(uint32_t *aNaturalWidth) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNaturalWidth(aNaturalWidth); } \
188 : NS_IMETHOD GetNaturalHeight(uint32_t *aNaturalHeight) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNaturalHeight(aNaturalHeight); } \
189 : NS_IMETHOD_(void) OnVisibilityChange(mozilla::Visibility aNewVisibility, const mozilla::Maybe<mozilla::OnNonvisible> & aNonvisibleAction) override;
190 :
191 : #if 0
192 : /* Use the code below as a template for the implementation class for this interface. */
193 :
194 : /* Header file */
195 : class nsImageLoadingContent : public nsIImageLoadingContent
196 : {
197 : public:
198 : NS_DECL_ISUPPORTS
199 : NS_DECL_NSIIMAGELOADINGCONTENT
200 :
201 : nsImageLoadingContent();
202 :
203 : private:
204 : ~nsImageLoadingContent();
205 :
206 : protected:
207 : /* additional members */
208 : };
209 :
210 : /* Implementation file */
211 : NS_IMPL_ISUPPORTS(nsImageLoadingContent, nsIImageLoadingContent)
212 :
213 : nsImageLoadingContent::nsImageLoadingContent()
214 : {
215 : /* member initializers and constructor code */
216 : }
217 :
218 : nsImageLoadingContent::~nsImageLoadingContent()
219 : {
220 : /* destructor code */
221 : }
222 :
223 : /* attribute boolean loadingEnabled; */
224 : NS_IMETHODIMP nsImageLoadingContent::GetLoadingEnabled(bool *aLoadingEnabled)
225 : {
226 : return NS_ERROR_NOT_IMPLEMENTED;
227 : }
228 : NS_IMETHODIMP nsImageLoadingContent::SetLoadingEnabled(bool aLoadingEnabled)
229 : {
230 : return NS_ERROR_NOT_IMPLEMENTED;
231 : }
232 :
233 : /* readonly attribute short imageBlockingStatus; */
234 : NS_IMETHODIMP nsImageLoadingContent::GetImageBlockingStatus(int16_t *aImageBlockingStatus)
235 : {
236 : return NS_ERROR_NOT_IMPLEMENTED;
237 : }
238 :
239 : /* void addObserver (in imgINotificationObserver aObserver); */
240 : NS_IMETHODIMP nsImageLoadingContent::AddObserver(imgINotificationObserver *aObserver)
241 : {
242 : return NS_ERROR_NOT_IMPLEMENTED;
243 : }
244 :
245 : /* void removeObserver (in imgINotificationObserver aObserver); */
246 : NS_IMETHODIMP nsImageLoadingContent::RemoveObserver(imgINotificationObserver *aObserver)
247 : {
248 : return NS_ERROR_NOT_IMPLEMENTED;
249 : }
250 :
251 : /* imgIRequest getRequest (in long aRequestType); */
252 : NS_IMETHODIMP nsImageLoadingContent::GetRequest(int32_t aRequestType, imgIRequest * *_retval)
253 : {
254 : return NS_ERROR_NOT_IMPLEMENTED;
255 : }
256 :
257 : /* void setBlockedRequest (in int16_t aContentDecision); */
258 : NS_IMETHODIMP nsImageLoadingContent::SetBlockedRequest(int16_t aContentDecision)
259 : {
260 : return NS_ERROR_NOT_IMPLEMENTED;
261 : }
262 :
263 : /* [noscript,notxpcom] boolean currentRequestHasSize (); */
264 : NS_IMETHODIMP_(bool) nsImageLoadingContent::CurrentRequestHasSize()
265 : {
266 : return NS_ERROR_NOT_IMPLEMENTED;
267 : }
268 :
269 : /* [notxpcom] void frameCreated (in nsIFrame aFrame); */
270 : NS_IMETHODIMP_(void) nsImageLoadingContent::FrameCreated(nsIFrame *aFrame)
271 : {
272 : return NS_ERROR_NOT_IMPLEMENTED;
273 : }
274 :
275 : /* [notxpcom] void frameDestroyed (in nsIFrame aFrame); */
276 : NS_IMETHODIMP_(void) nsImageLoadingContent::FrameDestroyed(nsIFrame *aFrame)
277 : {
278 : return NS_ERROR_NOT_IMPLEMENTED;
279 : }
280 :
281 : /* long getRequestType (in imgIRequest aRequest); */
282 : NS_IMETHODIMP nsImageLoadingContent::GetRequestType(imgIRequest *aRequest, int32_t *_retval)
283 : {
284 : return NS_ERROR_NOT_IMPLEMENTED;
285 : }
286 :
287 : /* readonly attribute nsIURI currentURI; */
288 : NS_IMETHODIMP nsImageLoadingContent::GetCurrentURI(nsIURI * *aCurrentURI)
289 : {
290 : return NS_ERROR_NOT_IMPLEMENTED;
291 : }
292 :
293 : /* nsIStreamListener loadImageWithChannel (in nsIChannel aChannel); */
294 : NS_IMETHODIMP nsImageLoadingContent::LoadImageWithChannel(nsIChannel *aChannel, nsIStreamListener * *_retval)
295 : {
296 : return NS_ERROR_NOT_IMPLEMENTED;
297 : }
298 :
299 : /* [optional_argc] void forceReload ([optional] in boolean aNotify); */
300 : NS_IMETHODIMP nsImageLoadingContent::ForceReload(bool aNotify, uint8_t _argc)
301 : {
302 : return NS_ERROR_NOT_IMPLEMENTED;
303 : }
304 :
305 : /* void forceImageState (in boolean aForce, in unsigned long long aState); */
306 : NS_IMETHODIMP nsImageLoadingContent::ForceImageState(bool aForce, uint64_t aState)
307 : {
308 : return NS_ERROR_NOT_IMPLEMENTED;
309 : }
310 :
311 : /* readonly attribute unsigned long naturalWidth; */
312 : NS_IMETHODIMP nsImageLoadingContent::GetNaturalWidth(uint32_t *aNaturalWidth)
313 : {
314 : return NS_ERROR_NOT_IMPLEMENTED;
315 : }
316 :
317 : /* readonly attribute unsigned long naturalHeight; */
318 : NS_IMETHODIMP nsImageLoadingContent::GetNaturalHeight(uint32_t *aNaturalHeight)
319 : {
320 : return NS_ERROR_NOT_IMPLEMENTED;
321 : }
322 :
323 : /* [noscript,notxpcom] void onVisibilityChange (in Visibility aNewVisibility, in MaybeOnNonvisible aNonvisibleAction); */
324 : NS_IMETHODIMP_(void) nsImageLoadingContent::OnVisibilityChange(mozilla::Visibility aNewVisibility, const mozilla::Maybe<mozilla::OnNonvisible> & aNonvisibleAction)
325 : {
326 : return NS_ERROR_NOT_IMPLEMENTED;
327 : }
328 :
329 : /* End of implementation class template. */
330 : #endif
331 :
332 :
333 : #endif /* __gen_nsIImageLoadingContent_h__ */
|