PageRenderTime 729ms CodeModel.GetById 717ms RepoModel.GetById 1ms app.codeStats 0ms

/gecko_api/include/nsIDOMEventListener.h

http://firefox-mac-pdf.googlecode.com/
C Header | 109 lines | 48 code | 26 blank | 35 comment | 0 complexity | f87092680eb7a376b1ad6d798ebb28de 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/nsIDOMEventListener.idl
  3. */
  4. #ifndef __gen_nsIDOMEventListener_h__
  5. #define __gen_nsIDOMEventListener_h__
  6. #ifndef __gen_domstubs_h__
  7. #include "domstubs.h"
  8. #endif
  9. /* For IDL files that don't want to include root IDL files. */
  10. #ifndef NS_NO_VTABLE
  11. #define NS_NO_VTABLE
  12. #endif
  13. /* starting interface: nsIDOMEventListener */
  14. #define NS_IDOMEVENTLISTENER_IID_STR "df31c120-ded6-11d1-bd85-00805f8ae3f4"
  15. #define NS_IDOMEVENTLISTENER_IID \
  16. {0xdf31c120, 0xded6, 0x11d1, \
  17. { 0xbd, 0x85, 0x00, 0x80, 0x5f, 0x8a, 0xe3, 0xf4 }}
  18. class NS_NO_VTABLE NS_SCRIPTABLE nsIDOMEventListener : public nsISupports {
  19. public:
  20. NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMEVENTLISTENER_IID)
  21. /**
  22. * The nsIDOMEventListener interface is a callback interface for
  23. * listening to events in the Document Object Model.
  24. *
  25. * For more information on this interface please see
  26. * http://www.w3.org/TR/DOM-Level-2-Events/
  27. *
  28. * @status FROZEN
  29. */
  30. /**
  31. * This method is called whenever an event occurs of the type for which
  32. * the EventListener interface was registered.
  33. *
  34. * @param evt The Event contains contextual information about the
  35. * event. It also contains the stopPropagation and
  36. * preventDefault methods which are used in determining the
  37. * event's flow and default action.
  38. */
  39. /* void handleEvent (in nsIDOMEvent event); */
  40. NS_SCRIPTABLE NS_IMETHOD HandleEvent(nsIDOMEvent *event) = 0;
  41. };
  42. NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMEventListener, NS_IDOMEVENTLISTENER_IID)
  43. /* Use this macro when declaring classes that implement this interface. */
  44. #define NS_DECL_NSIDOMEVENTLISTENER \
  45. NS_SCRIPTABLE NS_IMETHOD HandleEvent(nsIDOMEvent *event);
  46. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  47. #define NS_FORWARD_NSIDOMEVENTLISTENER(_to) \
  48. NS_SCRIPTABLE NS_IMETHOD HandleEvent(nsIDOMEvent *event) { return _to HandleEvent(event); }
  49. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  50. #define NS_FORWARD_SAFE_NSIDOMEVENTLISTENER(_to) \
  51. NS_SCRIPTABLE NS_IMETHOD HandleEvent(nsIDOMEvent *event) { return !_to ? NS_ERROR_NULL_POINTER : _to->HandleEvent(event); }
  52. #if 0
  53. /* Use the code below as a template for the implementation class for this interface. */
  54. /* Header file */
  55. class nsDOMEventListener : public nsIDOMEventListener
  56. {
  57. public:
  58. NS_DECL_ISUPPORTS
  59. NS_DECL_NSIDOMEVENTLISTENER
  60. nsDOMEventListener();
  61. private:
  62. ~nsDOMEventListener();
  63. protected:
  64. /* additional members */
  65. };
  66. /* Implementation file */
  67. NS_IMPL_ISUPPORTS1(nsDOMEventListener, nsIDOMEventListener)
  68. nsDOMEventListener::nsDOMEventListener()
  69. {
  70. /* member initializers and constructor code */
  71. }
  72. nsDOMEventListener::~nsDOMEventListener()
  73. {
  74. /* destructor code */
  75. }
  76. /* void handleEvent (in nsIDOMEvent event); */
  77. NS_IMETHODIMP nsDOMEventListener::HandleEvent(nsIDOMEvent *event)
  78. {
  79. return NS_ERROR_NOT_IMPLEMENTED;
  80. }
  81. /* End of implementation class template. */
  82. #endif
  83. #endif /* __gen_nsIDOMEventListener_h__ */