nsIDOMWindowCollection.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/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 nsIDOMWindowCollection : public nsISupports {
  19. public:
  20. NS_DEFINE_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_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_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_IMETHOD NamedItem(const nsAString & name, nsIDOMWindow **_retval) = 0;
  42. };
  43. /* Use this macro when declaring classes that implement this interface. */
  44. #define NS_DECL_NSIDOMWINDOWCOLLECTION \
  45. NS_IMETHOD GetLength(PRUint32 *aLength); \
  46. NS_IMETHOD Item(PRUint32 index, nsIDOMWindow **_retval); \
  47. NS_IMETHOD NamedItem(const nsAString & name, nsIDOMWindow **_retval);
  48. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  49. #define NS_FORWARD_NSIDOMWINDOWCOLLECTION(_to) \
  50. NS_IMETHOD GetLength(PRUint32 *aLength) { return _to GetLength(aLength); } \
  51. NS_IMETHOD Item(PRUint32 index, nsIDOMWindow **_retval) { return _to Item(index, _retval); } \
  52. NS_IMETHOD NamedItem(const nsAString & name, nsIDOMWindow **_retval) { return _to NamedItem(name, _retval); }
  53. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  54. #define NS_FORWARD_SAFE_NSIDOMWINDOWCOLLECTION(_to) \
  55. NS_IMETHOD GetLength(PRUint32 *aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLength(aLength); } \
  56. NS_IMETHOD Item(PRUint32 index, nsIDOMWindow **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Item(index, _retval); } \
  57. NS_IMETHOD NamedItem(const nsAString & name, nsIDOMWindow **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->NamedItem(name, _retval); }
  58. #if 0
  59. /* Use the code below as a template for the implementation class for this interface. */
  60. /* Header file */
  61. class nsDOMWindowCollection : public nsIDOMWindowCollection
  62. {
  63. public:
  64. NS_DECL_ISUPPORTS
  65. NS_DECL_NSIDOMWINDOWCOLLECTION
  66. nsDOMWindowCollection();
  67. private:
  68. ~nsDOMWindowCollection();
  69. protected:
  70. /* additional members */
  71. };
  72. /* Implementation file */
  73. NS_IMPL_ISUPPORTS1(nsDOMWindowCollection, nsIDOMWindowCollection)
  74. nsDOMWindowCollection::nsDOMWindowCollection()
  75. {
  76. /* member initializers and constructor code */
  77. }
  78. nsDOMWindowCollection::~nsDOMWindowCollection()
  79. {
  80. /* destructor code */
  81. }
  82. /* readonly attribute unsigned long length; */
  83. NS_IMETHODIMP nsDOMWindowCollection::GetLength(PRUint32 *aLength)
  84. {
  85. return NS_ERROR_NOT_IMPLEMENTED;
  86. }
  87. /* nsIDOMWindow item (in unsigned long index); */
  88. NS_IMETHODIMP nsDOMWindowCollection::Item(PRUint32 index, nsIDOMWindow **_retval)
  89. {
  90. return NS_ERROR_NOT_IMPLEMENTED;
  91. }
  92. /* nsIDOMWindow namedItem (in DOMString name); */
  93. NS_IMETHODIMP nsDOMWindowCollection::NamedItem(const nsAString & name, nsIDOMWindow **_retval)
  94. {
  95. return NS_ERROR_NOT_IMPLEMENTED;
  96. }
  97. /* End of implementation class template. */
  98. #endif
  99. #endif /* __gen_nsIDOMWindowCollection_h__ */