nsIWebBrowserChrome.h 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/embedding/browser/webBrowser/nsIWebBrowserChrome.idl
  3. */
  4. #ifndef __gen_nsIWebBrowserChrome_h__
  5. #define __gen_nsIWebBrowserChrome_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. class nsIWebBrowser; /* forward declaration */
  14. class nsIDocShellTreeItem; /* forward declaration */
  15. /* starting interface: nsIWebBrowserChrome */
  16. #define NS_IWEBBROWSERCHROME_IID_STR "ba434c60-9d52-11d3-afb0-00a024ffc08c"
  17. #define NS_IWEBBROWSERCHROME_IID \
  18. {0xba434c60, 0x9d52, 0x11d3, \
  19. { 0xaf, 0xb0, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c }}
  20. /**
  21. * nsIWebBrowserChrome corresponds to the top-level, outermost window
  22. * containing an embedded Gecko web browser.
  23. *
  24. * @status FROZEN
  25. */
  26. class NS_NO_VTABLE nsIWebBrowserChrome : public nsISupports {
  27. public:
  28. NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWEBBROWSERCHROME_IID)
  29. enum { STATUS_SCRIPT = 1U };
  30. enum { STATUS_SCRIPT_DEFAULT = 2U };
  31. enum { STATUS_LINK = 3U };
  32. /**
  33. * Called when the status text in the chrome needs to be updated.
  34. * @param statusType indicates what is setting the text
  35. * @param status status string. null is an acceptable value meaning
  36. * no status.
  37. */
  38. /* void setStatus (in unsigned long statusType, in wstring status); */
  39. NS_IMETHOD SetStatus(PRUint32 statusType, const PRUnichar *status) = 0;
  40. /**
  41. * The currently loaded WebBrowser. The browser chrome may be
  42. * told to set the WebBrowser object to a new object by setting this
  43. * attribute. In this case the implementer is responsible for taking the
  44. * new WebBrowser object and doing any necessary initialization or setup
  45. * as if it had created the WebBrowser itself. This includes positioning
  46. * setting up listeners etc.
  47. */
  48. /* attribute nsIWebBrowser webBrowser; */
  49. NS_IMETHOD GetWebBrowser(nsIWebBrowser * *aWebBrowser) = 0;
  50. NS_IMETHOD SetWebBrowser(nsIWebBrowser * aWebBrowser) = 0;
  51. /**
  52. * Definitions for the chrome flags
  53. */
  54. enum { CHROME_DEFAULT = 1U };
  55. enum { CHROME_WINDOW_BORDERS = 2U };
  56. enum { CHROME_WINDOW_CLOSE = 4U };
  57. enum { CHROME_WINDOW_RESIZE = 8U };
  58. enum { CHROME_MENUBAR = 16U };
  59. enum { CHROME_TOOLBAR = 32U };
  60. enum { CHROME_LOCATIONBAR = 64U };
  61. enum { CHROME_STATUSBAR = 128U };
  62. enum { CHROME_PERSONAL_TOOLBAR = 256U };
  63. enum { CHROME_SCROLLBARS = 512U };
  64. enum { CHROME_TITLEBAR = 1024U };
  65. enum { CHROME_EXTRA = 2048U };
  66. enum { CHROME_WITH_SIZE = 4096U };
  67. enum { CHROME_WITH_POSITION = 8192U };
  68. enum { CHROME_WINDOW_MIN = 16384U };
  69. enum { CHROME_WINDOW_POPUP = 32768U };
  70. enum { CHROME_WINDOW_RAISED = 33554432U };
  71. enum { CHROME_WINDOW_LOWERED = 67108864U };
  72. enum { CHROME_CENTER_SCREEN = 134217728U };
  73. enum { CHROME_DEPENDENT = 268435456U };
  74. enum { CHROME_MODAL = 536870912U };
  75. enum { CHROME_OPENAS_DIALOG = 1073741824U };
  76. enum { CHROME_OPENAS_CHROME = 2147483648U };
  77. enum { CHROME_ALL = 4094U };
  78. /**
  79. * The chrome flags for this browser chrome. The implementation should
  80. * reflect the value of this attribute by hiding or showing its chrome
  81. * appropriately.
  82. */
  83. /* attribute unsigned long chromeFlags; */
  84. NS_IMETHOD GetChromeFlags(PRUint32 *aChromeFlags) = 0;
  85. NS_IMETHOD SetChromeFlags(PRUint32 aChromeFlags) = 0;
  86. /**
  87. * Asks the implementer to destroy the window associated with this
  88. * WebBrowser object.
  89. */
  90. /* void destroyBrowserWindow (); */
  91. NS_IMETHOD DestroyBrowserWindow(void) = 0;
  92. /**
  93. * Tells the chrome to size itself such that the browser will be the
  94. * specified size.
  95. * @param aCX new width of the browser
  96. * @param aCY new height of the browser
  97. */
  98. /* void sizeBrowserTo (in long aCX, in long aCY); */
  99. NS_IMETHOD SizeBrowserTo(PRInt32 aCX, PRInt32 aCY) = 0;
  100. /**
  101. * Shows the window as a modal window.
  102. * @return (the function error code) the status value specified by
  103. * in exitModalEventLoop.
  104. */
  105. /* void showAsModal (); */
  106. NS_IMETHOD ShowAsModal(void) = 0;
  107. /**
  108. * Is the window modal (that is, currently executing a modal loop)?
  109. * @return true if it's a modal window
  110. */
  111. /* boolean isWindowModal (); */
  112. NS_IMETHOD IsWindowModal(PRBool *_retval) = 0;
  113. /**
  114. * Exit a modal event loop if we're in one. The implementation
  115. * should also exit out of the loop if the window is destroyed.
  116. * @param aStatus - the result code to return from showAsModal
  117. */
  118. /* void exitModalEventLoop (in nsresult aStatus); */
  119. NS_IMETHOD ExitModalEventLoop(nsresult aStatus) = 0;
  120. };
  121. /* Use this macro when declaring classes that implement this interface. */
  122. #define NS_DECL_NSIWEBBROWSERCHROME \
  123. NS_IMETHOD SetStatus(PRUint32 statusType, const PRUnichar *status); \
  124. NS_IMETHOD GetWebBrowser(nsIWebBrowser * *aWebBrowser); \
  125. NS_IMETHOD SetWebBrowser(nsIWebBrowser * aWebBrowser); \
  126. NS_IMETHOD GetChromeFlags(PRUint32 *aChromeFlags); \
  127. NS_IMETHOD SetChromeFlags(PRUint32 aChromeFlags); \
  128. NS_IMETHOD DestroyBrowserWindow(void); \
  129. NS_IMETHOD SizeBrowserTo(PRInt32 aCX, PRInt32 aCY); \
  130. NS_IMETHOD ShowAsModal(void); \
  131. NS_IMETHOD IsWindowModal(PRBool *_retval); \
  132. NS_IMETHOD ExitModalEventLoop(nsresult aStatus);
  133. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  134. #define NS_FORWARD_NSIWEBBROWSERCHROME(_to) \
  135. NS_IMETHOD SetStatus(PRUint32 statusType, const PRUnichar *status) { return _to SetStatus(statusType, status); } \
  136. NS_IMETHOD GetWebBrowser(nsIWebBrowser * *aWebBrowser) { return _to GetWebBrowser(aWebBrowser); } \
  137. NS_IMETHOD SetWebBrowser(nsIWebBrowser * aWebBrowser) { return _to SetWebBrowser(aWebBrowser); } \
  138. NS_IMETHOD GetChromeFlags(PRUint32 *aChromeFlags) { return _to GetChromeFlags(aChromeFlags); } \
  139. NS_IMETHOD SetChromeFlags(PRUint32 aChromeFlags) { return _to SetChromeFlags(aChromeFlags); } \
  140. NS_IMETHOD DestroyBrowserWindow(void) { return _to DestroyBrowserWindow(); } \
  141. NS_IMETHOD SizeBrowserTo(PRInt32 aCX, PRInt32 aCY) { return _to SizeBrowserTo(aCX, aCY); } \
  142. NS_IMETHOD ShowAsModal(void) { return _to ShowAsModal(); } \
  143. NS_IMETHOD IsWindowModal(PRBool *_retval) { return _to IsWindowModal(_retval); } \
  144. NS_IMETHOD ExitModalEventLoop(nsresult aStatus) { return _to ExitModalEventLoop(aStatus); }
  145. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  146. #define NS_FORWARD_SAFE_NSIWEBBROWSERCHROME(_to) \
  147. NS_IMETHOD SetStatus(PRUint32 statusType, const PRUnichar *status) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStatus(statusType, status); } \
  148. NS_IMETHOD GetWebBrowser(nsIWebBrowser * *aWebBrowser) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWebBrowser(aWebBrowser); } \
  149. NS_IMETHOD SetWebBrowser(nsIWebBrowser * aWebBrowser) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWebBrowser(aWebBrowser); } \
  150. NS_IMETHOD GetChromeFlags(PRUint32 *aChromeFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChromeFlags(aChromeFlags); } \
  151. NS_IMETHOD SetChromeFlags(PRUint32 aChromeFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChromeFlags(aChromeFlags); } \
  152. NS_IMETHOD DestroyBrowserWindow(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->DestroyBrowserWindow(); } \
  153. NS_IMETHOD SizeBrowserTo(PRInt32 aCX, PRInt32 aCY) { return !_to ? NS_ERROR_NULL_POINTER : _to->SizeBrowserTo(aCX, aCY); } \
  154. NS_IMETHOD ShowAsModal(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ShowAsModal(); } \
  155. NS_IMETHOD IsWindowModal(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsWindowModal(_retval); } \
  156. NS_IMETHOD ExitModalEventLoop(nsresult aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->ExitModalEventLoop(aStatus); }
  157. #if 0
  158. /* Use the code below as a template for the implementation class for this interface. */
  159. /* Header file */
  160. class nsWebBrowserChrome : public nsIWebBrowserChrome
  161. {
  162. public:
  163. NS_DECL_ISUPPORTS
  164. NS_DECL_NSIWEBBROWSERCHROME
  165. nsWebBrowserChrome();
  166. private:
  167. ~nsWebBrowserChrome();
  168. protected:
  169. /* additional members */
  170. };
  171. /* Implementation file */
  172. NS_IMPL_ISUPPORTS1(nsWebBrowserChrome, nsIWebBrowserChrome)
  173. nsWebBrowserChrome::nsWebBrowserChrome()
  174. {
  175. /* member initializers and constructor code */
  176. }
  177. nsWebBrowserChrome::~nsWebBrowserChrome()
  178. {
  179. /* destructor code */
  180. }
  181. /* void setStatus (in unsigned long statusType, in wstring status); */
  182. NS_IMETHODIMP nsWebBrowserChrome::SetStatus(PRUint32 statusType, const PRUnichar *status)
  183. {
  184. return NS_ERROR_NOT_IMPLEMENTED;
  185. }
  186. /* attribute nsIWebBrowser webBrowser; */
  187. NS_IMETHODIMP nsWebBrowserChrome::GetWebBrowser(nsIWebBrowser * *aWebBrowser)
  188. {
  189. return NS_ERROR_NOT_IMPLEMENTED;
  190. }
  191. NS_IMETHODIMP nsWebBrowserChrome::SetWebBrowser(nsIWebBrowser * aWebBrowser)
  192. {
  193. return NS_ERROR_NOT_IMPLEMENTED;
  194. }
  195. /* attribute unsigned long chromeFlags; */
  196. NS_IMETHODIMP nsWebBrowserChrome::GetChromeFlags(PRUint32 *aChromeFlags)
  197. {
  198. return NS_ERROR_NOT_IMPLEMENTED;
  199. }
  200. NS_IMETHODIMP nsWebBrowserChrome::SetChromeFlags(PRUint32 aChromeFlags)
  201. {
  202. return NS_ERROR_NOT_IMPLEMENTED;
  203. }
  204. /* void destroyBrowserWindow (); */
  205. NS_IMETHODIMP nsWebBrowserChrome::DestroyBrowserWindow()
  206. {
  207. return NS_ERROR_NOT_IMPLEMENTED;
  208. }
  209. /* void sizeBrowserTo (in long aCX, in long aCY); */
  210. NS_IMETHODIMP nsWebBrowserChrome::SizeBrowserTo(PRInt32 aCX, PRInt32 aCY)
  211. {
  212. return NS_ERROR_NOT_IMPLEMENTED;
  213. }
  214. /* void showAsModal (); */
  215. NS_IMETHODIMP nsWebBrowserChrome::ShowAsModal()
  216. {
  217. return NS_ERROR_NOT_IMPLEMENTED;
  218. }
  219. /* boolean isWindowModal (); */
  220. NS_IMETHODIMP nsWebBrowserChrome::IsWindowModal(PRBool *_retval)
  221. {
  222. return NS_ERROR_NOT_IMPLEMENTED;
  223. }
  224. /* void exitModalEventLoop (in nsresult aStatus); */
  225. NS_IMETHODIMP nsWebBrowserChrome::ExitModalEventLoop(nsresult aStatus)
  226. {
  227. return NS_ERROR_NOT_IMPLEMENTED;
  228. }
  229. /* End of implementation class template. */
  230. #endif
  231. #endif /* __gen_nsIWebBrowserChrome_h__ */