nsIDOMWindowUtils.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/dom/public/idl/base/nsIDOMWindowUtils.idl
  3. */
  4. #ifndef __gen_nsIDOMWindowUtils_h__
  5. #define __gen_nsIDOMWindowUtils_h__
  6. #ifndef __gen_nsISupports_h__
  7. #include "nsISupports.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: nsIDOMWindowUtils */
  14. #define NS_IDOMWINDOWUTILS_IID_STR "8a157a4f-a81e-489f-baf2-bc8970d60472"
  15. #define NS_IDOMWINDOWUTILS_IID \
  16. {0x8a157a4f, 0xa81e, 0x489f, \
  17. { 0xba, 0xf2, 0xbc, 0x89, 0x70, 0xd6, 0x04, 0x72 }}
  18. /**
  19. * nsIDOMWindowUtils is intended for giving privileged script access to
  20. * additional properties and methods of nsIDOMWindow unavailable to
  21. * content script. Access this interface by calling getInterface on a DOMWindow.
  22. */
  23. class NS_NO_VTABLE nsIDOMWindowUtils : public nsISupports {
  24. public:
  25. NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMWINDOWUTILS_IID)
  26. /**
  27. * Image animation mode of the window. When this attribute's value
  28. * is changed, the implementation should set all images in the window
  29. * to the given value. That is, when set to kDontAnimMode, all images
  30. * will stop animating. The attribute's value must be one of the
  31. * animationMode values from imgIContainer.
  32. * @note Images may individually override the window's setting after
  33. * the window's mode is set. Therefore images given different modes
  34. * since the last setting of the window's mode may behave
  35. * out of line with the window's overall mode.
  36. * @note The attribute's value is the window's overall mode. It may
  37. * for example continue to report kDontAnimMode after all images
  38. * have subsequently been individually animated.
  39. * @note Only images immediately in this window are affected;
  40. * this is not recursive to subwindows.
  41. * @see imgIContainer
  42. */
  43. /* attribute unsigned short imageAnimationMode; */
  44. NS_IMETHOD GetImageAnimationMode(PRUint16 *aImageAnimationMode) = 0;
  45. NS_IMETHOD SetImageAnimationMode(PRUint16 aImageAnimationMode) = 0;
  46. /**
  47. * Function to get metadata associated with the window's current document
  48. * @param aName the name of the metadata. This should be all lowercase.
  49. * @return the value of the metadata, or the empty string if it's not set
  50. */
  51. /* AString getDocumentMetadata (in AString aName); */
  52. NS_IMETHOD GetDocumentMetadata(const nsAString & aName, nsAString & _retval) = 0;
  53. };
  54. /* Use this macro when declaring classes that implement this interface. */
  55. #define NS_DECL_NSIDOMWINDOWUTILS \
  56. NS_IMETHOD GetImageAnimationMode(PRUint16 *aImageAnimationMode); \
  57. NS_IMETHOD SetImageAnimationMode(PRUint16 aImageAnimationMode); \
  58. NS_IMETHOD GetDocumentMetadata(const nsAString & aName, nsAString & _retval);
  59. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  60. #define NS_FORWARD_NSIDOMWINDOWUTILS(_to) \
  61. NS_IMETHOD GetImageAnimationMode(PRUint16 *aImageAnimationMode) { return _to GetImageAnimationMode(aImageAnimationMode); } \
  62. NS_IMETHOD SetImageAnimationMode(PRUint16 aImageAnimationMode) { return _to SetImageAnimationMode(aImageAnimationMode); } \
  63. NS_IMETHOD GetDocumentMetadata(const nsAString & aName, nsAString & _retval) { return _to GetDocumentMetadata(aName, _retval); }
  64. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  65. #define NS_FORWARD_SAFE_NSIDOMWINDOWUTILS(_to) \
  66. NS_IMETHOD GetImageAnimationMode(PRUint16 *aImageAnimationMode) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetImageAnimationMode(aImageAnimationMode); } \
  67. NS_IMETHOD SetImageAnimationMode(PRUint16 aImageAnimationMode) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetImageAnimationMode(aImageAnimationMode); } \
  68. NS_IMETHOD GetDocumentMetadata(const nsAString & aName, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocumentMetadata(aName, _retval); }
  69. #if 0
  70. /* Use the code below as a template for the implementation class for this interface. */
  71. /* Header file */
  72. class nsDOMWindowUtils : public nsIDOMWindowUtils
  73. {
  74. public:
  75. NS_DECL_ISUPPORTS
  76. NS_DECL_NSIDOMWINDOWUTILS
  77. nsDOMWindowUtils();
  78. private:
  79. ~nsDOMWindowUtils();
  80. protected:
  81. /* additional members */
  82. };
  83. /* Implementation file */
  84. NS_IMPL_ISUPPORTS1(nsDOMWindowUtils, nsIDOMWindowUtils)
  85. nsDOMWindowUtils::nsDOMWindowUtils()
  86. {
  87. /* member initializers and constructor code */
  88. }
  89. nsDOMWindowUtils::~nsDOMWindowUtils()
  90. {
  91. /* destructor code */
  92. }
  93. /* attribute unsigned short imageAnimationMode; */
  94. NS_IMETHODIMP nsDOMWindowUtils::GetImageAnimationMode(PRUint16 *aImageAnimationMode)
  95. {
  96. return NS_ERROR_NOT_IMPLEMENTED;
  97. }
  98. NS_IMETHODIMP nsDOMWindowUtils::SetImageAnimationMode(PRUint16 aImageAnimationMode)
  99. {
  100. return NS_ERROR_NOT_IMPLEMENTED;
  101. }
  102. /* AString getDocumentMetadata (in AString aName); */
  103. NS_IMETHODIMP nsDOMWindowUtils::GetDocumentMetadata(const nsAString & aName, nsAString & _retval)
  104. {
  105. return NS_ERROR_NOT_IMPLEMENTED;
  106. }
  107. /* End of implementation class template. */
  108. #endif
  109. #endif /* __gen_nsIDOMWindowUtils_h__ */