/gecko_api/include/nsIWebBrowserChrome.h

http://firefox-mac-pdf.googlecode.com/ · C Header · 301 lines · 149 code · 69 blank · 83 comment · 0 complexity · 7229936adece42f2d5fa779d2380ea4a MD5 · raw file

  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/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 NS_SCRIPTABLE nsIWebBrowserChrome : public nsISupports {
  27. public:
  28. NS_DECLARE_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_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD GetWebBrowser(nsIWebBrowser * *aWebBrowser) = 0;
  50. NS_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD GetChromeFlags(PRUint32 *aChromeFlags) = 0;
  85. NS_SCRIPTABLE 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_SCRIPTABLE 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_SCRIPTABLE 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_SCRIPTABLE 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_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD ExitModalEventLoop(nsresult aStatus) = 0;
  120. };
  121. NS_DEFINE_STATIC_IID_ACCESSOR(nsIWebBrowserChrome, NS_IWEBBROWSERCHROME_IID)
  122. /* Use this macro when declaring classes that implement this interface. */
  123. #define NS_DECL_NSIWEBBROWSERCHROME \
  124. NS_SCRIPTABLE NS_IMETHOD SetStatus(PRUint32 statusType, const PRUnichar *status); \
  125. NS_SCRIPTABLE NS_IMETHOD GetWebBrowser(nsIWebBrowser * *aWebBrowser); \
  126. NS_SCRIPTABLE NS_IMETHOD SetWebBrowser(nsIWebBrowser * aWebBrowser); \
  127. NS_SCRIPTABLE NS_IMETHOD GetChromeFlags(PRUint32 *aChromeFlags); \
  128. NS_SCRIPTABLE NS_IMETHOD SetChromeFlags(PRUint32 aChromeFlags); \
  129. NS_SCRIPTABLE NS_IMETHOD DestroyBrowserWindow(void); \
  130. NS_SCRIPTABLE NS_IMETHOD SizeBrowserTo(PRInt32 aCX, PRInt32 aCY); \
  131. NS_SCRIPTABLE NS_IMETHOD ShowAsModal(void); \
  132. NS_SCRIPTABLE NS_IMETHOD IsWindowModal(PRBool *_retval); \
  133. NS_SCRIPTABLE NS_IMETHOD ExitModalEventLoop(nsresult aStatus);
  134. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  135. #define NS_FORWARD_NSIWEBBROWSERCHROME(_to) \
  136. NS_SCRIPTABLE NS_IMETHOD SetStatus(PRUint32 statusType, const PRUnichar *status) { return _to SetStatus(statusType, status); } \
  137. NS_SCRIPTABLE NS_IMETHOD GetWebBrowser(nsIWebBrowser * *aWebBrowser) { return _to GetWebBrowser(aWebBrowser); } \
  138. NS_SCRIPTABLE NS_IMETHOD SetWebBrowser(nsIWebBrowser * aWebBrowser) { return _to SetWebBrowser(aWebBrowser); } \
  139. NS_SCRIPTABLE NS_IMETHOD GetChromeFlags(PRUint32 *aChromeFlags) { return _to GetChromeFlags(aChromeFlags); } \
  140. NS_SCRIPTABLE NS_IMETHOD SetChromeFlags(PRUint32 aChromeFlags) { return _to SetChromeFlags(aChromeFlags); } \
  141. NS_SCRIPTABLE NS_IMETHOD DestroyBrowserWindow(void) { return _to DestroyBrowserWindow(); } \
  142. NS_SCRIPTABLE NS_IMETHOD SizeBrowserTo(PRInt32 aCX, PRInt32 aCY) { return _to SizeBrowserTo(aCX, aCY); } \
  143. NS_SCRIPTABLE NS_IMETHOD ShowAsModal(void) { return _to ShowAsModal(); } \
  144. NS_SCRIPTABLE NS_IMETHOD IsWindowModal(PRBool *_retval) { return _to IsWindowModal(_retval); } \
  145. NS_SCRIPTABLE NS_IMETHOD ExitModalEventLoop(nsresult aStatus) { return _to ExitModalEventLoop(aStatus); }
  146. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  147. #define NS_FORWARD_SAFE_NSIWEBBROWSERCHROME(_to) \
  148. NS_SCRIPTABLE NS_IMETHOD SetStatus(PRUint32 statusType, const PRUnichar *status) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStatus(statusType, status); } \
  149. NS_SCRIPTABLE NS_IMETHOD GetWebBrowser(nsIWebBrowser * *aWebBrowser) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWebBrowser(aWebBrowser); } \
  150. NS_SCRIPTABLE NS_IMETHOD SetWebBrowser(nsIWebBrowser * aWebBrowser) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWebBrowser(aWebBrowser); } \
  151. NS_SCRIPTABLE NS_IMETHOD GetChromeFlags(PRUint32 *aChromeFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChromeFlags(aChromeFlags); } \
  152. NS_SCRIPTABLE NS_IMETHOD SetChromeFlags(PRUint32 aChromeFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetChromeFlags(aChromeFlags); } \
  153. NS_SCRIPTABLE NS_IMETHOD DestroyBrowserWindow(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->DestroyBrowserWindow(); } \
  154. NS_SCRIPTABLE NS_IMETHOD SizeBrowserTo(PRInt32 aCX, PRInt32 aCY) { return !_to ? NS_ERROR_NULL_POINTER : _to->SizeBrowserTo(aCX, aCY); } \
  155. NS_SCRIPTABLE NS_IMETHOD ShowAsModal(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ShowAsModal(); } \
  156. NS_SCRIPTABLE NS_IMETHOD IsWindowModal(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsWindowModal(_retval); } \
  157. NS_SCRIPTABLE NS_IMETHOD ExitModalEventLoop(nsresult aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->ExitModalEventLoop(aStatus); }
  158. #if 0
  159. /* Use the code below as a template for the implementation class for this interface. */
  160. /* Header file */
  161. class nsWebBrowserChrome : public nsIWebBrowserChrome
  162. {
  163. public:
  164. NS_DECL_ISUPPORTS
  165. NS_DECL_NSIWEBBROWSERCHROME
  166. nsWebBrowserChrome();
  167. private:
  168. ~nsWebBrowserChrome();
  169. protected:
  170. /* additional members */
  171. };
  172. /* Implementation file */
  173. NS_IMPL_ISUPPORTS1(nsWebBrowserChrome, nsIWebBrowserChrome)
  174. nsWebBrowserChrome::nsWebBrowserChrome()
  175. {
  176. /* member initializers and constructor code */
  177. }
  178. nsWebBrowserChrome::~nsWebBrowserChrome()
  179. {
  180. /* destructor code */
  181. }
  182. /* void setStatus (in unsigned long statusType, in wstring status); */
  183. NS_IMETHODIMP nsWebBrowserChrome::SetStatus(PRUint32 statusType, const PRUnichar *status)
  184. {
  185. return NS_ERROR_NOT_IMPLEMENTED;
  186. }
  187. /* attribute nsIWebBrowser webBrowser; */
  188. NS_IMETHODIMP nsWebBrowserChrome::GetWebBrowser(nsIWebBrowser * *aWebBrowser)
  189. {
  190. return NS_ERROR_NOT_IMPLEMENTED;
  191. }
  192. NS_IMETHODIMP nsWebBrowserChrome::SetWebBrowser(nsIWebBrowser * aWebBrowser)
  193. {
  194. return NS_ERROR_NOT_IMPLEMENTED;
  195. }
  196. /* attribute unsigned long chromeFlags; */
  197. NS_IMETHODIMP nsWebBrowserChrome::GetChromeFlags(PRUint32 *aChromeFlags)
  198. {
  199. return NS_ERROR_NOT_IMPLEMENTED;
  200. }
  201. NS_IMETHODIMP nsWebBrowserChrome::SetChromeFlags(PRUint32 aChromeFlags)
  202. {
  203. return NS_ERROR_NOT_IMPLEMENTED;
  204. }
  205. /* void destroyBrowserWindow (); */
  206. NS_IMETHODIMP nsWebBrowserChrome::DestroyBrowserWindow()
  207. {
  208. return NS_ERROR_NOT_IMPLEMENTED;
  209. }
  210. /* void sizeBrowserTo (in long aCX, in long aCY); */
  211. NS_IMETHODIMP nsWebBrowserChrome::SizeBrowserTo(PRInt32 aCX, PRInt32 aCY)
  212. {
  213. return NS_ERROR_NOT_IMPLEMENTED;
  214. }
  215. /* void showAsModal (); */
  216. NS_IMETHODIMP nsWebBrowserChrome::ShowAsModal()
  217. {
  218. return NS_ERROR_NOT_IMPLEMENTED;
  219. }
  220. /* boolean isWindowModal (); */
  221. NS_IMETHODIMP nsWebBrowserChrome::IsWindowModal(PRBool *_retval)
  222. {
  223. return NS_ERROR_NOT_IMPLEMENTED;
  224. }
  225. /* void exitModalEventLoop (in nsresult aStatus); */
  226. NS_IMETHODIMP nsWebBrowserChrome::ExitModalEventLoop(nsresult aStatus)
  227. {
  228. return NS_ERROR_NOT_IMPLEMENTED;
  229. }
  230. /* End of implementation class template. */
  231. #endif
  232. #endif /* __gen_nsIWebBrowserChrome_h__ */