PageRenderTime 103ms CodeModel.GetById 40ms app.highlight 7ms RepoModel.GetById 34ms app.codeStats 0ms

/gecko_api/include/nsIWebProgress.h

http://firefox-mac-pdf.googlecode.com/
C++ Header | 258 lines | 85 code | 45 blank | 128 comment | 0 complexity | 72e11d72276d082698550e33868a17d0 MD5 | raw file
  1/*
  2 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/uriloader/base/nsIWebProgress.idl
  3 */
  4
  5#ifndef __gen_nsIWebProgress_h__
  6#define __gen_nsIWebProgress_h__
  7
  8
  9#ifndef __gen_nsISupports_h__
 10#include "nsISupports.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
 17class nsIDOMWindow; /* forward declaration */
 18
 19class nsIWebProgressListener; /* forward declaration */
 20
 21
 22/* starting interface:    nsIWebProgress */
 23#define NS_IWEBPROGRESS_IID_STR "570f39d0-efd0-11d3-b093-00a024ffc08c"
 24
 25#define NS_IWEBPROGRESS_IID \
 26  {0x570f39d0, 0xefd0, 0x11d3, \
 27    { 0xb0, 0x93, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c }}
 28
 29/**
 30 * The nsIWebProgress interface is used to add or remove nsIWebProgressListener
 31 * instances to observe the loading of asynchronous requests (usually in the
 32 * context of a DOM window).
 33 *
 34 * nsIWebProgress instances may be arranged in a parent-child configuration,
 35 * corresponding to the parent-child configuration of their respective DOM
 36 * windows.  However, in some cases a nsIWebProgress instance may not have an
 37 * associated DOM window.  The parent-child relationship of nsIWebProgress
 38 * instances is not made explicit by this interface, but the relationship may
 39 * exist in some implementations.
 40 *
 41 * A nsIWebProgressListener instance receives notifications for the
 42 * nsIWebProgress instance to which it added itself, and it may also receive
 43 * notifications from any nsIWebProgress instances that are children of that
 44 * nsIWebProgress instance.
 45 *
 46 * @status FROZEN
 47 */
 48class NS_NO_VTABLE NS_SCRIPTABLE nsIWebProgress : public nsISupports {
 49 public: 
 50
 51  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWEBPROGRESS_IID)
 52
 53  /**
 54   * The following flags may be combined to form the aNotifyMask parameter for
 55   * the addProgressListener method.  They limit the set of events that are
 56   * delivered to an nsIWebProgressListener instance.
 57   */
 58/**
 59   * These flags indicate the state transistions to observe, corresponding to
 60   * nsIWebProgressListener::onStateChange.
 61   *
 62   * NOTIFY_STATE_REQUEST
 63   *   Only receive the onStateChange event if the aStateFlags parameter
 64   *   includes nsIWebProgressListener::STATE_IS_REQUEST.
 65   *   
 66   * NOTIFY_STATE_DOCUMENT
 67   *   Only receive the onStateChange event if the aStateFlags parameter
 68   *   includes nsIWebProgressListener::STATE_IS_DOCUMENT.
 69   *
 70   * NOTIFY_STATE_NETWORK
 71   *   Only receive the onStateChange event if the aStateFlags parameter
 72   *   includes nsIWebProgressListener::STATE_IS_NETWORK.
 73   *
 74   * NOTIFY_STATE_WINDOW
 75   *   Only receive the onStateChange event if the aStateFlags parameter
 76   *   includes nsIWebProgressListener::STATE_IS_WINDOW.
 77   *
 78   * NOTIFY_STATE_ALL
 79   *   Receive all onStateChange events.
 80   */
 81  enum { NOTIFY_STATE_REQUEST = 1U };
 82
 83  enum { NOTIFY_STATE_DOCUMENT = 2U };
 84
 85  enum { NOTIFY_STATE_NETWORK = 4U };
 86
 87  enum { NOTIFY_STATE_WINDOW = 8U };
 88
 89  enum { NOTIFY_STATE_ALL = 15U };
 90
 91  /**
 92   * These flags indicate the other events to observe, corresponding to the
 93   * other four methods defined on nsIWebProgressListener.
 94   *
 95   * NOTIFY_PROGRESS
 96   *   Receive onProgressChange events.
 97   *
 98   * NOTIFY_STATUS
 99   *   Receive onStatusChange events.
100   *
101   * NOTIFY_SECURITY
102   *   Receive onSecurityChange events.
103   *
104   * NOTIFY_LOCATION
105   *   Receive onLocationChange events.
106   *
107   * NOTIFY_REFRESH
108   *   Receive onRefreshAttempted events.
109   *   This is defined on nsIWebProgressListener2.
110   */
111  enum { NOTIFY_PROGRESS = 16U };
112
113  enum { NOTIFY_STATUS = 32U };
114
115  enum { NOTIFY_SECURITY = 64U };
116
117  enum { NOTIFY_LOCATION = 128U };
118
119  enum { NOTIFY_REFRESH = 256U };
120
121  /**
122   * This flag enables all notifications.
123   */
124  enum { NOTIFY_ALL = 511U };
125
126  /**
127   * Registers a listener to receive web progress events.
128   *
129   * @param aListener
130   *        The listener interface to be called when a progress event occurs.
131   *        This object must also implement nsISupportsWeakReference.
132   * @param aNotifyMask
133   *        The types of notifications to receive.
134   *
135   * @throw NS_ERROR_INVALID_ARG
136   *        Indicates that aListener was either null or that it does not
137   *        support weak references.
138   * @throw NS_ERROR_FAILURE
139   *        Indicates that aListener was already registered.
140   */
141  /* void addProgressListener (in nsIWebProgressListener aListener, in unsigned long aNotifyMask); */
142  NS_SCRIPTABLE NS_IMETHOD AddProgressListener(nsIWebProgressListener *aListener, PRUint32 aNotifyMask) = 0;
143
144  /**
145   * Removes a previously registered listener of progress events.
146   *
147   * @param aListener
148   *        The listener interface previously registered with a call to
149   *        addProgressListener.
150   *
151   * @throw NS_ERROR_FAILURE
152   *        Indicates that aListener was not registered.
153   */
154  /* void removeProgressListener (in nsIWebProgressListener aListener); */
155  NS_SCRIPTABLE NS_IMETHOD RemoveProgressListener(nsIWebProgressListener *aListener) = 0;
156
157  /**
158   * The DOM window associated with this nsIWebProgress instance.
159   *
160   * @throw NS_ERROR_FAILURE
161   *        Indicates that there is no associated DOM window.
162   */
163  /* readonly attribute nsIDOMWindow DOMWindow; */
164  NS_SCRIPTABLE NS_IMETHOD GetDOMWindow(nsIDOMWindow * *aDOMWindow) = 0;
165
166  /**
167   * Indicates whether or not a document is currently being loaded
168   * in the context of this nsIWebProgress instance.
169   */
170  /* readonly attribute PRBool isLoadingDocument; */
171  NS_SCRIPTABLE NS_IMETHOD GetIsLoadingDocument(PRBool *aIsLoadingDocument) = 0;
172
173};
174
175  NS_DEFINE_STATIC_IID_ACCESSOR(nsIWebProgress, NS_IWEBPROGRESS_IID)
176
177/* Use this macro when declaring classes that implement this interface. */
178#define NS_DECL_NSIWEBPROGRESS \
179  NS_SCRIPTABLE NS_IMETHOD AddProgressListener(nsIWebProgressListener *aListener, PRUint32 aNotifyMask); \
180  NS_SCRIPTABLE NS_IMETHOD RemoveProgressListener(nsIWebProgressListener *aListener); \
181  NS_SCRIPTABLE NS_IMETHOD GetDOMWindow(nsIDOMWindow * *aDOMWindow); \
182  NS_SCRIPTABLE NS_IMETHOD GetIsLoadingDocument(PRBool *aIsLoadingDocument); 
183
184/* Use this macro to declare functions that forward the behavior of this interface to another object. */
185#define NS_FORWARD_NSIWEBPROGRESS(_to) \
186  NS_SCRIPTABLE NS_IMETHOD AddProgressListener(nsIWebProgressListener *aListener, PRUint32 aNotifyMask) { return _to AddProgressListener(aListener, aNotifyMask); } \
187  NS_SCRIPTABLE NS_IMETHOD RemoveProgressListener(nsIWebProgressListener *aListener) { return _to RemoveProgressListener(aListener); } \
188  NS_SCRIPTABLE NS_IMETHOD GetDOMWindow(nsIDOMWindow * *aDOMWindow) { return _to GetDOMWindow(aDOMWindow); } \
189  NS_SCRIPTABLE NS_IMETHOD GetIsLoadingDocument(PRBool *aIsLoadingDocument) { return _to GetIsLoadingDocument(aIsLoadingDocument); } 
190
191/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
192#define NS_FORWARD_SAFE_NSIWEBPROGRESS(_to) \
193  NS_SCRIPTABLE NS_IMETHOD AddProgressListener(nsIWebProgressListener *aListener, PRUint32 aNotifyMask) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddProgressListener(aListener, aNotifyMask); } \
194  NS_SCRIPTABLE NS_IMETHOD RemoveProgressListener(nsIWebProgressListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveProgressListener(aListener); } \
195  NS_SCRIPTABLE NS_IMETHOD GetDOMWindow(nsIDOMWindow * *aDOMWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDOMWindow(aDOMWindow); } \
196  NS_SCRIPTABLE NS_IMETHOD GetIsLoadingDocument(PRBool *aIsLoadingDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsLoadingDocument(aIsLoadingDocument); } 
197
198#if 0
199/* Use the code below as a template for the implementation class for this interface. */
200
201/* Header file */
202class nsWebProgress : public nsIWebProgress
203{
204public:
205  NS_DECL_ISUPPORTS
206  NS_DECL_NSIWEBPROGRESS
207
208  nsWebProgress();
209
210private:
211  ~nsWebProgress();
212
213protected:
214  /* additional members */
215};
216
217/* Implementation file */
218NS_IMPL_ISUPPORTS1(nsWebProgress, nsIWebProgress)
219
220nsWebProgress::nsWebProgress()
221{
222  /* member initializers and constructor code */
223}
224
225nsWebProgress::~nsWebProgress()
226{
227  /* destructor code */
228}
229
230/* void addProgressListener (in nsIWebProgressListener aListener, in unsigned long aNotifyMask); */
231NS_IMETHODIMP nsWebProgress::AddProgressListener(nsIWebProgressListener *aListener, PRUint32 aNotifyMask)
232{
233    return NS_ERROR_NOT_IMPLEMENTED;
234}
235
236/* void removeProgressListener (in nsIWebProgressListener aListener); */
237NS_IMETHODIMP nsWebProgress::RemoveProgressListener(nsIWebProgressListener *aListener)
238{
239    return NS_ERROR_NOT_IMPLEMENTED;
240}
241
242/* readonly attribute nsIDOMWindow DOMWindow; */
243NS_IMETHODIMP nsWebProgress::GetDOMWindow(nsIDOMWindow * *aDOMWindow)
244{
245    return NS_ERROR_NOT_IMPLEMENTED;
246}
247
248/* readonly attribute PRBool isLoadingDocument; */
249NS_IMETHODIMP nsWebProgress::GetIsLoadingDocument(PRBool *aIsLoadingDocument)
250{
251    return NS_ERROR_NOT_IMPLEMENTED;
252}
253
254/* End of implementation class template. */
255#endif
256
257
258#endif /* __gen_nsIWebProgress_h__ */