PageRenderTime 22ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/gecko_api/include/nsIDOMWindowCollection.h

http://firefox-mac-pdf.googlecode.com/
C Header | 130 lines | 64 code | 30 blank | 36 comment | 0 complexity | f38ad1957dddf3fda96fdc3c6091e625 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/base/nsIDOMWindowCollection.idl
  3. */
  4. #ifndef __gen_nsIDOMWindowCollection_h__
  5. #define __gen_nsIDOMWindowCollection_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: nsIDOMWindowCollection */
  14. #define NS_IDOMWINDOWCOLLECTION_IID_STR "a6cf906f-15b3-11d2-932e-00805f8add32"
  15. #define NS_IDOMWINDOWCOLLECTION_IID \
  16. {0xa6cf906f, 0x15b3, 0x11d2, \
  17. { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }}
  18. class NS_NO_VTABLE NS_SCRIPTABLE nsIDOMWindowCollection : public nsISupports {
  19. public:
  20. NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMWINDOWCOLLECTION_IID)
  21. /**
  22. * The nsIDOMWindowCollection interface is an interface for a
  23. * collection of DOM window objects.
  24. *
  25. * @status FROZEN
  26. */
  27. /**
  28. * Accessor for the number of windows in this collection.
  29. */
  30. /* readonly attribute unsigned long length; */
  31. NS_SCRIPTABLE NS_IMETHOD GetLength(PRUint32 *aLength) = 0;
  32. /**
  33. * Method for accessing an item in this collection by index.
  34. */
  35. /* nsIDOMWindow item (in unsigned long index); */
  36. NS_SCRIPTABLE NS_IMETHOD Item(PRUint32 index, nsIDOMWindow **_retval) = 0;
  37. /**
  38. * Method for accessing an item in this collection by window name.
  39. */
  40. /* nsIDOMWindow namedItem (in DOMString name); */
  41. NS_SCRIPTABLE NS_IMETHOD NamedItem(const nsAString & name, nsIDOMWindow **_retval) = 0;
  42. };
  43. NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMWindowCollection, NS_IDOMWINDOWCOLLECTION_IID)
  44. /* Use this macro when declaring classes that implement this interface. */
  45. #define NS_DECL_NSIDOMWINDOWCOLLECTION \
  46. NS_SCRIPTABLE NS_IMETHOD GetLength(PRUint32 *aLength); \
  47. NS_SCRIPTABLE NS_IMETHOD Item(PRUint32 index, nsIDOMWindow **_retval); \
  48. NS_SCRIPTABLE NS_IMETHOD NamedItem(const nsAString & name, nsIDOMWindow **_retval);
  49. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  50. #define NS_FORWARD_NSIDOMWINDOWCOLLECTION(_to) \
  51. NS_SCRIPTABLE NS_IMETHOD GetLength(PRUint32 *aLength) { return _to GetLength(aLength); } \
  52. NS_SCRIPTABLE NS_IMETHOD Item(PRUint32 index, nsIDOMWindow **_retval) { return _to Item(index, _retval); } \
  53. NS_SCRIPTABLE NS_IMETHOD NamedItem(const nsAString & name, nsIDOMWindow **_retval) { return _to NamedItem(name, _retval); }
  54. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  55. #define NS_FORWARD_SAFE_NSIDOMWINDOWCOLLECTION(_to) \
  56. NS_SCRIPTABLE NS_IMETHOD GetLength(PRUint32 *aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLength(aLength); } \
  57. NS_SCRIPTABLE NS_IMETHOD Item(PRUint32 index, nsIDOMWindow **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Item(index, _retval); } \
  58. NS_SCRIPTABLE NS_IMETHOD NamedItem(const nsAString & name, nsIDOMWindow **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->NamedItem(name, _retval); }
  59. #if 0
  60. /* Use the code below as a template for the implementation class for this interface. */
  61. /* Header file */
  62. class nsDOMWindowCollection : public nsIDOMWindowCollection
  63. {
  64. public:
  65. NS_DECL_ISUPPORTS
  66. NS_DECL_NSIDOMWINDOWCOLLECTION
  67. nsDOMWindowCollection();
  68. private:
  69. ~nsDOMWindowCollection();
  70. protected:
  71. /* additional members */
  72. };
  73. /* Implementation file */
  74. NS_IMPL_ISUPPORTS1(nsDOMWindowCollection, nsIDOMWindowCollection)
  75. nsDOMWindowCollection::nsDOMWindowCollection()
  76. {
  77. /* member initializers and constructor code */
  78. }
  79. nsDOMWindowCollection::~nsDOMWindowCollection()
  80. {
  81. /* destructor code */
  82. }
  83. /* readonly attribute unsigned long length; */
  84. NS_IMETHODIMP nsDOMWindowCollection::GetLength(PRUint32 *aLength)
  85. {
  86. return NS_ERROR_NOT_IMPLEMENTED;
  87. }
  88. /* nsIDOMWindow item (in unsigned long index); */
  89. NS_IMETHODIMP nsDOMWindowCollection::Item(PRUint32 index, nsIDOMWindow **_retval)
  90. {
  91. return NS_ERROR_NOT_IMPLEMENTED;
  92. }
  93. /* nsIDOMWindow namedItem (in DOMString name); */
  94. NS_IMETHODIMP nsDOMWindowCollection::NamedItem(const nsAString & name, nsIDOMWindow **_retval)
  95. {
  96. return NS_ERROR_NOT_IMPLEMENTED;
  97. }
  98. /* End of implementation class template. */
  99. #endif
  100. #endif /* __gen_nsIDOMWindowCollection_h__ */