PageRenderTime 83ms CodeModel.GetById 40ms app.highlight 7ms RepoModel.GetById 33ms app.codeStats 0ms

/gecko_api/include/nsIDOMEvent.h

http://firefox-mac-pdf.googlecode.com/
C++ Header | 305 lines | 124 code | 48 blank | 133 comment | 0 complexity | 527566bc42e82badf81e3c7be105b827 MD5 | raw file
  1/*
  2 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/dom/public/idl/events/nsIDOMEvent.idl
  3 */
  4
  5#ifndef __gen_nsIDOMEvent_h__
  6#define __gen_nsIDOMEvent_h__
  7
  8
  9#ifndef __gen_domstubs_h__
 10#include "domstubs.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 nsIDOMEventTarget; /* forward declaration */
 18
 19
 20/* starting interface:    nsIDOMEvent */
 21#define NS_IDOMEVENT_IID_STR "a66b7b80-ff46-bd97-0080-5f8ae38add32"
 22
 23#define NS_IDOMEVENT_IID \
 24  {0xa66b7b80, 0xff46, 0xbd97, \
 25    { 0x00, 0x80, 0x5f, 0x8a, 0xe3, 0x8a, 0xdd, 0x32 }}
 26
 27class NS_NO_VTABLE NS_SCRIPTABLE nsIDOMEvent : public nsISupports {
 28 public: 
 29
 30  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMEVENT_IID)
 31
 32  /**
 33 * The nsIDOMEvent interface is the primary datatype for all events in
 34 * the Document Object Model.
 35 *
 36 * For more information on this interface please see 
 37 * http://www.w3.org/TR/DOM-Level-2-Events/
 38 *
 39 * @status FROZEN
 40 */
 41/**
 42   * The current event phase is the capturing phase.
 43   */
 44  enum { CAPTURING_PHASE = 1U };
 45
 46  /**
 47   * The event is currently being evaluated at the target EventTarget.
 48   */
 49  enum { AT_TARGET = 2U };
 50
 51  /**
 52   * The current event phase is the bubbling phase.
 53   */
 54  enum { BUBBLING_PHASE = 3U };
 55
 56  /**
 57   * The name of the event (case-insensitive). The name must be an XML 
 58   * name.
 59   */
 60  /* readonly attribute DOMString type; */
 61  NS_SCRIPTABLE NS_IMETHOD GetType(nsAString & aType) = 0;
 62
 63  /**
 64   * Used to indicate the EventTarget to which the event was originally 
 65   * dispatched.
 66   */
 67  /* readonly attribute nsIDOMEventTarget target; */
 68  NS_SCRIPTABLE NS_IMETHOD GetTarget(nsIDOMEventTarget * *aTarget) = 0;
 69
 70  /**
 71   * Used to indicate the EventTarget whose EventListeners are currently 
 72   * being processed. This is particularly useful during capturing and 
 73   * bubbling.
 74   */
 75  /* readonly attribute nsIDOMEventTarget currentTarget; */
 76  NS_SCRIPTABLE NS_IMETHOD GetCurrentTarget(nsIDOMEventTarget * *aCurrentTarget) = 0;
 77
 78  /**
 79   * Used to indicate which phase of event flow is currently being 
 80   * evaluated.
 81   */
 82  /* readonly attribute unsigned short eventPhase; */
 83  NS_SCRIPTABLE NS_IMETHOD GetEventPhase(PRUint16 *aEventPhase) = 0;
 84
 85  /**
 86   * Used to indicate whether or not an event is a bubbling event. If the 
 87   * event can bubble the value is true, else the value is false.
 88   */
 89  /* readonly attribute boolean bubbles; */
 90  NS_SCRIPTABLE NS_IMETHOD GetBubbles(PRBool *aBubbles) = 0;
 91
 92  /**
 93   * Used to indicate whether or not an event can have its default action 
 94   * prevented. If the default action can be prevented the value is true, 
 95   * else the value is false.
 96   */
 97  /* readonly attribute boolean cancelable; */
 98  NS_SCRIPTABLE NS_IMETHOD GetCancelable(PRBool *aCancelable) = 0;
 99
100  /**
101   * Used to specify the time (in milliseconds relative to the epoch) at 
102   * which the event was created. Due to the fact that some systems may 
103   * not provide this information the value of timeStamp may be not 
104   * available for all events. When not available, a value of 0 will be 
105   * returned. Examples of epoch time are the time of the system start or 
106   * 0:0:0 UTC 1st January 1970.
107   */
108  /* readonly attribute DOMTimeStamp timeStamp; */
109  NS_SCRIPTABLE NS_IMETHOD GetTimeStamp(DOMTimeStamp *aTimeStamp) = 0;
110
111  /**
112   * The stopPropagation method is used prevent further propagation of an 
113   * event during event flow. If this method is called by any 
114   * EventListener the event will cease propagating through the tree. The 
115   * event will complete dispatch to all listeners on the current 
116   * EventTarget before event flow stops. This method may be used during 
117   * any stage of event flow.
118   */
119  /* void stopPropagation (); */
120  NS_SCRIPTABLE NS_IMETHOD StopPropagation(void) = 0;
121
122  /**
123   * If an event is cancelable, the preventDefault method is used to 
124   * signify that the event is to be canceled, meaning any default action 
125   * normally taken by the implementation as a result of the event will 
126   * not occur. If, during any stage of event flow, the preventDefault 
127   * method is called the event is canceled. Any default action associated 
128   * with the event will not occur. Calling this method for a 
129   * non-cancelable event has no effect. Once preventDefault has been 
130   * called it will remain in effect throughout the remainder of the 
131   * event's propagation. This method may be used during any stage of 
132   * event flow.
133   */
134  /* void preventDefault (); */
135  NS_SCRIPTABLE NS_IMETHOD PreventDefault(void) = 0;
136
137  /**
138   * The initEvent method is used to initialize the value of an Event 
139   * created through the DocumentEvent interface. This method may only be 
140   * called before the Event has been dispatched via the dispatchEvent 
141   * method, though it may be called multiple times during that phase if 
142   * necessary. If called multiple times the final invocation takes 
143   * precedence. If called from a subclass of Event interface only the 
144   * values specified in the initEvent method are modified, all other 
145   * attributes are left unchanged.
146   *
147   * @param   eventTypeArg Specifies the event type. This type may be 
148   *                       any event type currently defined in this 
149   *                       specification or a new event type.. The string 
150   *                       must be an XML name.
151   *                       Any new event type must not begin with any 
152   *                       upper, lower, or mixed case version of the 
153   *                       string "DOM". This prefix is reserved for 
154   *                       future DOM event sets. It is also strongly 
155   *                       recommended that third parties adding their 
156   *                       own events use their own prefix to avoid 
157   *                       confusion and lessen the probability of 
158   *                       conflicts with other new events.
159   * @param   canBubbleArg Specifies whether or not the event can bubble.
160   * @param   cancelableArg Specifies whether or not the event's default 
161   *                        action can be prevented.
162   */
163  /* void initEvent (in DOMString eventTypeArg, in boolean canBubbleArg, in boolean cancelableArg); */
164  NS_SCRIPTABLE NS_IMETHOD InitEvent(const nsAString & eventTypeArg, PRBool canBubbleArg, PRBool cancelableArg) = 0;
165
166};
167
168  NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMEvent, NS_IDOMEVENT_IID)
169
170/* Use this macro when declaring classes that implement this interface. */
171#define NS_DECL_NSIDOMEVENT \
172  NS_SCRIPTABLE NS_IMETHOD GetType(nsAString & aType); \
173  NS_SCRIPTABLE NS_IMETHOD GetTarget(nsIDOMEventTarget * *aTarget); \
174  NS_SCRIPTABLE NS_IMETHOD GetCurrentTarget(nsIDOMEventTarget * *aCurrentTarget); \
175  NS_SCRIPTABLE NS_IMETHOD GetEventPhase(PRUint16 *aEventPhase); \
176  NS_SCRIPTABLE NS_IMETHOD GetBubbles(PRBool *aBubbles); \
177  NS_SCRIPTABLE NS_IMETHOD GetCancelable(PRBool *aCancelable); \
178  NS_SCRIPTABLE NS_IMETHOD GetTimeStamp(DOMTimeStamp *aTimeStamp); \
179  NS_SCRIPTABLE NS_IMETHOD StopPropagation(void); \
180  NS_SCRIPTABLE NS_IMETHOD PreventDefault(void); \
181  NS_SCRIPTABLE NS_IMETHOD InitEvent(const nsAString & eventTypeArg, PRBool canBubbleArg, PRBool cancelableArg); 
182
183/* Use this macro to declare functions that forward the behavior of this interface to another object. */
184#define NS_FORWARD_NSIDOMEVENT(_to) \
185  NS_SCRIPTABLE NS_IMETHOD GetType(nsAString & aType) { return _to GetType(aType); } \
186  NS_SCRIPTABLE NS_IMETHOD GetTarget(nsIDOMEventTarget * *aTarget) { return _to GetTarget(aTarget); } \
187  NS_SCRIPTABLE NS_IMETHOD GetCurrentTarget(nsIDOMEventTarget * *aCurrentTarget) { return _to GetCurrentTarget(aCurrentTarget); } \
188  NS_SCRIPTABLE NS_IMETHOD GetEventPhase(PRUint16 *aEventPhase) { return _to GetEventPhase(aEventPhase); } \
189  NS_SCRIPTABLE NS_IMETHOD GetBubbles(PRBool *aBubbles) { return _to GetBubbles(aBubbles); } \
190  NS_SCRIPTABLE NS_IMETHOD GetCancelable(PRBool *aCancelable) { return _to GetCancelable(aCancelable); } \
191  NS_SCRIPTABLE NS_IMETHOD GetTimeStamp(DOMTimeStamp *aTimeStamp) { return _to GetTimeStamp(aTimeStamp); } \
192  NS_SCRIPTABLE NS_IMETHOD StopPropagation(void) { return _to StopPropagation(); } \
193  NS_SCRIPTABLE NS_IMETHOD PreventDefault(void) { return _to PreventDefault(); } \
194  NS_SCRIPTABLE NS_IMETHOD InitEvent(const nsAString & eventTypeArg, PRBool canBubbleArg, PRBool cancelableArg) { return _to InitEvent(eventTypeArg, canBubbleArg, cancelableArg); } 
195
196/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
197#define NS_FORWARD_SAFE_NSIDOMEVENT(_to) \
198  NS_SCRIPTABLE NS_IMETHOD GetType(nsAString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \
199  NS_SCRIPTABLE NS_IMETHOD GetTarget(nsIDOMEventTarget * *aTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTarget(aTarget); } \
200  NS_SCRIPTABLE NS_IMETHOD GetCurrentTarget(nsIDOMEventTarget * *aCurrentTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentTarget(aCurrentTarget); } \
201  NS_SCRIPTABLE NS_IMETHOD GetEventPhase(PRUint16 *aEventPhase) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEventPhase(aEventPhase); } \
202  NS_SCRIPTABLE NS_IMETHOD GetBubbles(PRBool *aBubbles) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBubbles(aBubbles); } \
203  NS_SCRIPTABLE NS_IMETHOD GetCancelable(PRBool *aCancelable) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCancelable(aCancelable); } \
204  NS_SCRIPTABLE NS_IMETHOD GetTimeStamp(DOMTimeStamp *aTimeStamp) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTimeStamp(aTimeStamp); } \
205  NS_SCRIPTABLE NS_IMETHOD StopPropagation(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->StopPropagation(); } \
206  NS_SCRIPTABLE NS_IMETHOD PreventDefault(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->PreventDefault(); } \
207  NS_SCRIPTABLE NS_IMETHOD InitEvent(const nsAString & eventTypeArg, PRBool canBubbleArg, PRBool cancelableArg) { return !_to ? NS_ERROR_NULL_POINTER : _to->InitEvent(eventTypeArg, canBubbleArg, cancelableArg); } 
208
209#if 0
210/* Use the code below as a template for the implementation class for this interface. */
211
212/* Header file */
213class nsDOMEvent : public nsIDOMEvent
214{
215public:
216  NS_DECL_ISUPPORTS
217  NS_DECL_NSIDOMEVENT
218
219  nsDOMEvent();
220
221private:
222  ~nsDOMEvent();
223
224protected:
225  /* additional members */
226};
227
228/* Implementation file */
229NS_IMPL_ISUPPORTS1(nsDOMEvent, nsIDOMEvent)
230
231nsDOMEvent::nsDOMEvent()
232{
233  /* member initializers and constructor code */
234}
235
236nsDOMEvent::~nsDOMEvent()
237{
238  /* destructor code */
239}
240
241/* readonly attribute DOMString type; */
242NS_IMETHODIMP nsDOMEvent::GetType(nsAString & aType)
243{
244    return NS_ERROR_NOT_IMPLEMENTED;
245}
246
247/* readonly attribute nsIDOMEventTarget target; */
248NS_IMETHODIMP nsDOMEvent::GetTarget(nsIDOMEventTarget * *aTarget)
249{
250    return NS_ERROR_NOT_IMPLEMENTED;
251}
252
253/* readonly attribute nsIDOMEventTarget currentTarget; */
254NS_IMETHODIMP nsDOMEvent::GetCurrentTarget(nsIDOMEventTarget * *aCurrentTarget)
255{
256    return NS_ERROR_NOT_IMPLEMENTED;
257}
258
259/* readonly attribute unsigned short eventPhase; */
260NS_IMETHODIMP nsDOMEvent::GetEventPhase(PRUint16 *aEventPhase)
261{
262    return NS_ERROR_NOT_IMPLEMENTED;
263}
264
265/* readonly attribute boolean bubbles; */
266NS_IMETHODIMP nsDOMEvent::GetBubbles(PRBool *aBubbles)
267{
268    return NS_ERROR_NOT_IMPLEMENTED;
269}
270
271/* readonly attribute boolean cancelable; */
272NS_IMETHODIMP nsDOMEvent::GetCancelable(PRBool *aCancelable)
273{
274    return NS_ERROR_NOT_IMPLEMENTED;
275}
276
277/* readonly attribute DOMTimeStamp timeStamp; */
278NS_IMETHODIMP nsDOMEvent::GetTimeStamp(DOMTimeStamp *aTimeStamp)
279{
280    return NS_ERROR_NOT_IMPLEMENTED;
281}
282
283/* void stopPropagation (); */
284NS_IMETHODIMP nsDOMEvent::StopPropagation()
285{
286    return NS_ERROR_NOT_IMPLEMENTED;
287}
288
289/* void preventDefault (); */
290NS_IMETHODIMP nsDOMEvent::PreventDefault()
291{
292    return NS_ERROR_NOT_IMPLEMENTED;
293}
294
295/* void initEvent (in DOMString eventTypeArg, in boolean canBubbleArg, in boolean cancelableArg); */
296NS_IMETHODIMP nsDOMEvent::InitEvent(const nsAString & eventTypeArg, PRBool canBubbleArg, PRBool cancelableArg)
297{
298    return NS_ERROR_NOT_IMPLEMENTED;
299}
300
301/* End of implementation class template. */
302#endif
303
304
305#endif /* __gen_nsIDOMEvent_h__ */