nsIWebBrowserSetup.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/embedding/browser/webBrowser/nsIWebBrowserSetup.idl
  3. */
  4. #ifndef __gen_nsIWebBrowserSetup_h__
  5. #define __gen_nsIWebBrowserSetup_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: nsIWebBrowserSetup */
  14. #define NS_IWEBBROWSERSETUP_IID_STR "f15398a0-8018-11d3-af70-00a024ffc08c"
  15. #define NS_IWEBBROWSERSETUP_IID \
  16. {0xf15398a0, 0x8018, 0x11d3, \
  17. { 0xaf, 0x70, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c }}
  18. /**
  19. * The nsIWebBrowserSetup interface allows certain properties of a new browser
  20. * object to set before the browser window is opened.
  21. *
  22. * @note Unless stated otherwise, settings are presumed to be enabled by
  23. * default.
  24. *
  25. * @status FROZEN
  26. */
  27. class NS_NO_VTABLE nsIWebBrowserSetup : public nsISupports {
  28. public:
  29. NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWEBBROWSERSETUP_IID)
  30. /**
  31. * Boolean. Enables/disables plugin support for this browser.
  32. *
  33. * @see setProperty
  34. */
  35. enum { SETUP_ALLOW_PLUGINS = 1U };
  36. /**
  37. * Boolean. Enables/disables Javascript support for this browser.
  38. *
  39. * @see setProperty
  40. */
  41. enum { SETUP_ALLOW_JAVASCRIPT = 2U };
  42. /**
  43. * Boolean. Enables/disables meta redirect support for this browser.
  44. * Meta redirect timers will be ignored if this option is disabled.
  45. *
  46. * @see setProperty
  47. */
  48. enum { SETUP_ALLOW_META_REDIRECTS = 3U };
  49. /**
  50. * Boolean. Enables/disables subframes within the browser
  51. *
  52. * @see setProperty
  53. */
  54. enum { SETUP_ALLOW_SUBFRAMES = 4U };
  55. /**
  56. * Boolean. Enables/disables image loading for this browser
  57. * window. If you disable the images, load a page, then enable the images,
  58. * the page will *not* automatically load the images for the previously
  59. * loaded page. This flag controls the state of a webBrowser at load time
  60. * and does not automatically re-load a page when the state is toggled.
  61. * Reloading must be done by hand, or by walking through the DOM tree and
  62. * re-setting the src attributes.
  63. *
  64. * @see setProperty
  65. */
  66. enum { SETUP_ALLOW_IMAGES = 5U };
  67. /**
  68. * Boolean. Enables/disables whether the document as a whole gets focus before
  69. * traversing the document's content, or after traversing its content.
  70. *
  71. * NOTE: this property is obsolete and now has no effect
  72. *
  73. * @see setProperty
  74. */
  75. enum { SETUP_FOCUS_DOC_BEFORE_CONTENT = 6U };
  76. /**
  77. * Boolean. Enables/disables the use of global history in the browser. Visited
  78. * URLs will not be recorded in the global history when it is disabled.
  79. *
  80. * @see setProperty
  81. */
  82. enum { SETUP_USE_GLOBAL_HISTORY = 256U };
  83. /**
  84. * Boolean. A value of PR_TRUE makes the browser a chrome wrapper.
  85. * Default is PR_FALSE.
  86. *
  87. * @since mozilla1.0
  88. *
  89. * @see setProperty
  90. */
  91. enum { SETUP_IS_CHROME_WRAPPER = 7U };
  92. /**
  93. * Sets an integer or boolean property on the new web browser object.
  94. * Only PR_TRUE and PR_FALSE are legal boolean values.
  95. *
  96. * @param aId The identifier of the property to be set.
  97. * @param aValue The value of the property.
  98. */
  99. /* void setProperty (in unsigned long aId, in unsigned long aValue); */
  100. NS_IMETHOD SetProperty(PRUint32 aId, PRUint32 aValue) = 0;
  101. };
  102. /* Use this macro when declaring classes that implement this interface. */
  103. #define NS_DECL_NSIWEBBROWSERSETUP \
  104. NS_IMETHOD SetProperty(PRUint32 aId, PRUint32 aValue);
  105. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  106. #define NS_FORWARD_NSIWEBBROWSERSETUP(_to) \
  107. NS_IMETHOD SetProperty(PRUint32 aId, PRUint32 aValue) { return _to SetProperty(aId, aValue); }
  108. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  109. #define NS_FORWARD_SAFE_NSIWEBBROWSERSETUP(_to) \
  110. NS_IMETHOD SetProperty(PRUint32 aId, PRUint32 aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetProperty(aId, aValue); }
  111. #if 0
  112. /* Use the code below as a template for the implementation class for this interface. */
  113. /* Header file */
  114. class nsWebBrowserSetup : public nsIWebBrowserSetup
  115. {
  116. public:
  117. NS_DECL_ISUPPORTS
  118. NS_DECL_NSIWEBBROWSERSETUP
  119. nsWebBrowserSetup();
  120. private:
  121. ~nsWebBrowserSetup();
  122. protected:
  123. /* additional members */
  124. };
  125. /* Implementation file */
  126. NS_IMPL_ISUPPORTS1(nsWebBrowserSetup, nsIWebBrowserSetup)
  127. nsWebBrowserSetup::nsWebBrowserSetup()
  128. {
  129. /* member initializers and constructor code */
  130. }
  131. nsWebBrowserSetup::~nsWebBrowserSetup()
  132. {
  133. /* destructor code */
  134. }
  135. /* void setProperty (in unsigned long aId, in unsigned long aValue); */
  136. NS_IMETHODIMP nsWebBrowserSetup::SetProperty(PRUint32 aId, PRUint32 aValue)
  137. {
  138. return NS_ERROR_NOT_IMPLEMENTED;
  139. }
  140. /* End of implementation class template. */
  141. #endif
  142. #endif /* __gen_nsIWebBrowserSetup_h__ */