PageRenderTime 39ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/gecko_api/include/nsIDOMWindow.h

http://firefox-mac-pdf.googlecode.com/
C Header | 356 lines | 177 code | 55 blank | 124 comment | 0 complexity | e240d01b3c0bee58631fc18ccc8f2842 MD5 | raw file
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/dom/public/idl/base/nsIDOMWindow.idl
  3. */
  4. #ifndef __gen_nsIDOMWindow_h__
  5. #define __gen_nsIDOMWindow_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. class nsISelection; /* forward declaration */
  14. /* starting interface: nsIDOMWindow */
  15. #define NS_IDOMWINDOW_IID_STR "a6cf906b-15b3-11d2-932e-00805f8add32"
  16. #define NS_IDOMWINDOW_IID \
  17. {0xa6cf906b, 0x15b3, 0x11d2, \
  18. { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 }}
  19. class NS_NO_VTABLE NS_SCRIPTABLE nsIDOMWindow : public nsISupports {
  20. public:
  21. NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMWINDOW_IID)
  22. /**
  23. * The nsIDOMWindow interface is the primary interface for a DOM
  24. * window object. It represents a single window object that may
  25. * contain child windows if the document in the window contains a
  26. * HTML frameset document or if the document contains iframe elements.
  27. *
  28. * This interface is not officially defined by any standard bodies, it
  29. * originates from the defacto DOM Level 0 standard.
  30. *
  31. * @status FROZEN
  32. */
  33. /**
  34. * Accessor for the document in this window.
  35. */
  36. /* readonly attribute nsIDOMDocument document; */
  37. NS_SCRIPTABLE NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument) = 0;
  38. /**
  39. * Accessor for this window's parent window, or the window itself if
  40. * there is no parent, or if the parent is of different type
  41. * (i.e. this does not cross chrome-content boundaries).
  42. */
  43. /* readonly attribute nsIDOMWindow parent; */
  44. NS_SCRIPTABLE NS_IMETHOD GetParent(nsIDOMWindow * *aParent) = 0;
  45. /**
  46. * Accessor for the root of this hierarchy of windows. This root may
  47. * be the window itself if there is no parent, or if the parent is
  48. * of different type (i.e. this does not cross chrome-content
  49. * boundaries).
  50. *
  51. * This property is "replaceable" in JavaScript */
  52. /* readonly attribute nsIDOMWindow top; */
  53. NS_SCRIPTABLE NS_IMETHOD GetTop(nsIDOMWindow * *aTop) = 0;
  54. /**
  55. * Accessor for the object that controls whether or not scrollbars
  56. * are shown in this window.
  57. *
  58. * This attribute is "replaceable" in JavaScript
  59. */
  60. /* readonly attribute nsIDOMBarProp scrollbars; */
  61. NS_SCRIPTABLE NS_IMETHOD GetScrollbars(nsIDOMBarProp * *aScrollbars) = 0;
  62. /**
  63. * Accessor for the child windows in this window.
  64. */
  65. /* [noscript] readonly attribute nsIDOMWindowCollection frames; */
  66. NS_IMETHOD GetFrames(nsIDOMWindowCollection * *aFrames) = 0;
  67. /**
  68. * Set/Get the name of this window.
  69. *
  70. * This attribute is "replaceable" in JavaScript
  71. */
  72. /* attribute DOMString name; */
  73. NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) = 0;
  74. NS_SCRIPTABLE NS_IMETHOD SetName(const nsAString & aName) = 0;
  75. /**
  76. * Set/Get the document scale factor as a multiplier on the default
  77. * size. When setting this attribute, a NS_ERROR_NOT_IMPLEMENTED
  78. * error may be returned by implementations not supporting
  79. * zoom. Implementations not supporting zoom should return 1.0 all
  80. * the time for the Get operation. 1.0 is equals normal size,
  81. * i.e. no zoom.
  82. */
  83. /* [noscript] attribute float textZoom; */
  84. NS_IMETHOD GetTextZoom(float *aTextZoom) = 0;
  85. NS_IMETHOD SetTextZoom(float aTextZoom) = 0;
  86. /**
  87. * Accessor for the current x scroll position in this window in
  88. * pixels.
  89. *
  90. * This attribute is "replaceable" in JavaScript
  91. */
  92. /* readonly attribute long scrollX; */
  93. NS_SCRIPTABLE NS_IMETHOD GetScrollX(PRInt32 *aScrollX) = 0;
  94. /**
  95. * Accessor for the current y scroll position in this window in
  96. * pixels.
  97. *
  98. * This attribute is "replaceable" in JavaScript
  99. */
  100. /* readonly attribute long scrollY; */
  101. NS_SCRIPTABLE NS_IMETHOD GetScrollY(PRInt32 *aScrollY) = 0;
  102. /**
  103. * Method for scrolling this window to an absolute pixel offset.
  104. */
  105. /* void scrollTo (in long xScroll, in long yScroll); */
  106. NS_SCRIPTABLE NS_IMETHOD ScrollTo(PRInt32 xScroll, PRInt32 yScroll) = 0;
  107. /**
  108. * Method for scrolling this window to a pixel offset relative to
  109. * the current scroll position.
  110. */
  111. /* void scrollBy (in long xScrollDif, in long yScrollDif); */
  112. NS_SCRIPTABLE NS_IMETHOD ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif) = 0;
  113. /**
  114. * Method for accessing this window's selection object.
  115. */
  116. /* nsISelection getSelection (); */
  117. NS_SCRIPTABLE NS_IMETHOD GetSelection(nsISelection **_retval) = 0;
  118. /**
  119. * Method for scrolling this window by a number of lines.
  120. */
  121. /* void scrollByLines (in long numLines); */
  122. NS_SCRIPTABLE NS_IMETHOD ScrollByLines(PRInt32 numLines) = 0;
  123. /**
  124. * Method for scrolling this window by a number of pages.
  125. */
  126. /* void scrollByPages (in long numPages); */
  127. NS_SCRIPTABLE NS_IMETHOD ScrollByPages(PRInt32 numPages) = 0;
  128. /**
  129. * Method for sizing this window to the content in the window.
  130. */
  131. /* void sizeToContent (); */
  132. NS_SCRIPTABLE NS_IMETHOD SizeToContent(void) = 0;
  133. };
  134. NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMWindow, NS_IDOMWINDOW_IID)
  135. /* Use this macro when declaring classes that implement this interface. */
  136. #define NS_DECL_NSIDOMWINDOW \
  137. NS_SCRIPTABLE NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument); \
  138. NS_SCRIPTABLE NS_IMETHOD GetParent(nsIDOMWindow * *aParent); \
  139. NS_SCRIPTABLE NS_IMETHOD GetTop(nsIDOMWindow * *aTop); \
  140. NS_SCRIPTABLE NS_IMETHOD GetScrollbars(nsIDOMBarProp * *aScrollbars); \
  141. NS_IMETHOD GetFrames(nsIDOMWindowCollection * *aFrames); \
  142. NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName); \
  143. NS_SCRIPTABLE NS_IMETHOD SetName(const nsAString & aName); \
  144. NS_IMETHOD GetTextZoom(float *aTextZoom); \
  145. NS_IMETHOD SetTextZoom(float aTextZoom); \
  146. NS_SCRIPTABLE NS_IMETHOD GetScrollX(PRInt32 *aScrollX); \
  147. NS_SCRIPTABLE NS_IMETHOD GetScrollY(PRInt32 *aScrollY); \
  148. NS_SCRIPTABLE NS_IMETHOD ScrollTo(PRInt32 xScroll, PRInt32 yScroll); \
  149. NS_SCRIPTABLE NS_IMETHOD ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif); \
  150. NS_SCRIPTABLE NS_IMETHOD GetSelection(nsISelection **_retval); \
  151. NS_SCRIPTABLE NS_IMETHOD ScrollByLines(PRInt32 numLines); \
  152. NS_SCRIPTABLE NS_IMETHOD ScrollByPages(PRInt32 numPages); \
  153. NS_SCRIPTABLE NS_IMETHOD SizeToContent(void);
  154. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  155. #define NS_FORWARD_NSIDOMWINDOW(_to) \
  156. NS_SCRIPTABLE NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument) { return _to GetDocument(aDocument); } \
  157. NS_SCRIPTABLE NS_IMETHOD GetParent(nsIDOMWindow * *aParent) { return _to GetParent(aParent); } \
  158. NS_SCRIPTABLE NS_IMETHOD GetTop(nsIDOMWindow * *aTop) { return _to GetTop(aTop); } \
  159. NS_SCRIPTABLE NS_IMETHOD GetScrollbars(nsIDOMBarProp * *aScrollbars) { return _to GetScrollbars(aScrollbars); } \
  160. NS_IMETHOD GetFrames(nsIDOMWindowCollection * *aFrames) { return _to GetFrames(aFrames); } \
  161. NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) { return _to GetName(aName); } \
  162. NS_SCRIPTABLE NS_IMETHOD SetName(const nsAString & aName) { return _to SetName(aName); } \
  163. NS_IMETHOD GetTextZoom(float *aTextZoom) { return _to GetTextZoom(aTextZoom); } \
  164. NS_IMETHOD SetTextZoom(float aTextZoom) { return _to SetTextZoom(aTextZoom); } \
  165. NS_SCRIPTABLE NS_IMETHOD GetScrollX(PRInt32 *aScrollX) { return _to GetScrollX(aScrollX); } \
  166. NS_SCRIPTABLE NS_IMETHOD GetScrollY(PRInt32 *aScrollY) { return _to GetScrollY(aScrollY); } \
  167. NS_SCRIPTABLE NS_IMETHOD ScrollTo(PRInt32 xScroll, PRInt32 yScroll) { return _to ScrollTo(xScroll, yScroll); } \
  168. NS_SCRIPTABLE NS_IMETHOD ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif) { return _to ScrollBy(xScrollDif, yScrollDif); } \
  169. NS_SCRIPTABLE NS_IMETHOD GetSelection(nsISelection **_retval) { return _to GetSelection(_retval); } \
  170. NS_SCRIPTABLE NS_IMETHOD ScrollByLines(PRInt32 numLines) { return _to ScrollByLines(numLines); } \
  171. NS_SCRIPTABLE NS_IMETHOD ScrollByPages(PRInt32 numPages) { return _to ScrollByPages(numPages); } \
  172. NS_SCRIPTABLE NS_IMETHOD SizeToContent(void) { return _to SizeToContent(); }
  173. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  174. #define NS_FORWARD_SAFE_NSIDOMWINDOW(_to) \
  175. NS_SCRIPTABLE NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocument(aDocument); } \
  176. NS_SCRIPTABLE NS_IMETHOD GetParent(nsIDOMWindow * *aParent) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParent(aParent); } \
  177. NS_SCRIPTABLE NS_IMETHOD GetTop(nsIDOMWindow * *aTop) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTop(aTop); } \
  178. NS_SCRIPTABLE NS_IMETHOD GetScrollbars(nsIDOMBarProp * *aScrollbars) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScrollbars(aScrollbars); } \
  179. NS_IMETHOD GetFrames(nsIDOMWindowCollection * *aFrames) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFrames(aFrames); } \
  180. NS_SCRIPTABLE NS_IMETHOD GetName(nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
  181. NS_SCRIPTABLE NS_IMETHOD SetName(const nsAString & aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } \
  182. NS_IMETHOD GetTextZoom(float *aTextZoom) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTextZoom(aTextZoom); } \
  183. NS_IMETHOD SetTextZoom(float aTextZoom) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTextZoom(aTextZoom); } \
  184. NS_SCRIPTABLE NS_IMETHOD GetScrollX(PRInt32 *aScrollX) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScrollX(aScrollX); } \
  185. NS_SCRIPTABLE NS_IMETHOD GetScrollY(PRInt32 *aScrollY) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScrollY(aScrollY); } \
  186. NS_SCRIPTABLE NS_IMETHOD ScrollTo(PRInt32 xScroll, PRInt32 yScroll) { return !_to ? NS_ERROR_NULL_POINTER : _to->ScrollTo(xScroll, yScroll); } \
  187. NS_SCRIPTABLE NS_IMETHOD ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif) { return !_to ? NS_ERROR_NULL_POINTER : _to->ScrollBy(xScrollDif, yScrollDif); } \
  188. NS_SCRIPTABLE NS_IMETHOD GetSelection(nsISelection **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSelection(_retval); } \
  189. NS_SCRIPTABLE NS_IMETHOD ScrollByLines(PRInt32 numLines) { return !_to ? NS_ERROR_NULL_POINTER : _to->ScrollByLines(numLines); } \
  190. NS_SCRIPTABLE NS_IMETHOD ScrollByPages(PRInt32 numPages) { return !_to ? NS_ERROR_NULL_POINTER : _to->ScrollByPages(numPages); } \
  191. NS_SCRIPTABLE NS_IMETHOD SizeToContent(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SizeToContent(); }
  192. #if 0
  193. /* Use the code below as a template for the implementation class for this interface. */
  194. /* Header file */
  195. class nsDOMWindow : public nsIDOMWindow
  196. {
  197. public:
  198. NS_DECL_ISUPPORTS
  199. NS_DECL_NSIDOMWINDOW
  200. nsDOMWindow();
  201. private:
  202. ~nsDOMWindow();
  203. protected:
  204. /* additional members */
  205. };
  206. /* Implementation file */
  207. NS_IMPL_ISUPPORTS1(nsDOMWindow, nsIDOMWindow)
  208. nsDOMWindow::nsDOMWindow()
  209. {
  210. /* member initializers and constructor code */
  211. }
  212. nsDOMWindow::~nsDOMWindow()
  213. {
  214. /* destructor code */
  215. }
  216. /* readonly attribute nsIDOMDocument document; */
  217. NS_IMETHODIMP nsDOMWindow::GetDocument(nsIDOMDocument * *aDocument)
  218. {
  219. return NS_ERROR_NOT_IMPLEMENTED;
  220. }
  221. /* readonly attribute nsIDOMWindow parent; */
  222. NS_IMETHODIMP nsDOMWindow::GetParent(nsIDOMWindow * *aParent)
  223. {
  224. return NS_ERROR_NOT_IMPLEMENTED;
  225. }
  226. /* readonly attribute nsIDOMWindow top; */
  227. NS_IMETHODIMP nsDOMWindow::GetTop(nsIDOMWindow * *aTop)
  228. {
  229. return NS_ERROR_NOT_IMPLEMENTED;
  230. }
  231. /* readonly attribute nsIDOMBarProp scrollbars; */
  232. NS_IMETHODIMP nsDOMWindow::GetScrollbars(nsIDOMBarProp * *aScrollbars)
  233. {
  234. return NS_ERROR_NOT_IMPLEMENTED;
  235. }
  236. /* [noscript] readonly attribute nsIDOMWindowCollection frames; */
  237. NS_IMETHODIMP nsDOMWindow::GetFrames(nsIDOMWindowCollection * *aFrames)
  238. {
  239. return NS_ERROR_NOT_IMPLEMENTED;
  240. }
  241. /* attribute DOMString name; */
  242. NS_IMETHODIMP nsDOMWindow::GetName(nsAString & aName)
  243. {
  244. return NS_ERROR_NOT_IMPLEMENTED;
  245. }
  246. NS_IMETHODIMP nsDOMWindow::SetName(const nsAString & aName)
  247. {
  248. return NS_ERROR_NOT_IMPLEMENTED;
  249. }
  250. /* [noscript] attribute float textZoom; */
  251. NS_IMETHODIMP nsDOMWindow::GetTextZoom(float *aTextZoom)
  252. {
  253. return NS_ERROR_NOT_IMPLEMENTED;
  254. }
  255. NS_IMETHODIMP nsDOMWindow::SetTextZoom(float aTextZoom)
  256. {
  257. return NS_ERROR_NOT_IMPLEMENTED;
  258. }
  259. /* readonly attribute long scrollX; */
  260. NS_IMETHODIMP nsDOMWindow::GetScrollX(PRInt32 *aScrollX)
  261. {
  262. return NS_ERROR_NOT_IMPLEMENTED;
  263. }
  264. /* readonly attribute long scrollY; */
  265. NS_IMETHODIMP nsDOMWindow::GetScrollY(PRInt32 *aScrollY)
  266. {
  267. return NS_ERROR_NOT_IMPLEMENTED;
  268. }
  269. /* void scrollTo (in long xScroll, in long yScroll); */
  270. NS_IMETHODIMP nsDOMWindow::ScrollTo(PRInt32 xScroll, PRInt32 yScroll)
  271. {
  272. return NS_ERROR_NOT_IMPLEMENTED;
  273. }
  274. /* void scrollBy (in long xScrollDif, in long yScrollDif); */
  275. NS_IMETHODIMP nsDOMWindow::ScrollBy(PRInt32 xScrollDif, PRInt32 yScrollDif)
  276. {
  277. return NS_ERROR_NOT_IMPLEMENTED;
  278. }
  279. /* nsISelection getSelection (); */
  280. NS_IMETHODIMP nsDOMWindow::GetSelection(nsISelection **_retval)
  281. {
  282. return NS_ERROR_NOT_IMPLEMENTED;
  283. }
  284. /* void scrollByLines (in long numLines); */
  285. NS_IMETHODIMP nsDOMWindow::ScrollByLines(PRInt32 numLines)
  286. {
  287. return NS_ERROR_NOT_IMPLEMENTED;
  288. }
  289. /* void scrollByPages (in long numPages); */
  290. NS_IMETHODIMP nsDOMWindow::ScrollByPages(PRInt32 numPages)
  291. {
  292. return NS_ERROR_NOT_IMPLEMENTED;
  293. }
  294. /* void sizeToContent (); */
  295. NS_IMETHODIMP nsDOMWindow::SizeToContent()
  296. {
  297. return NS_ERROR_NOT_IMPLEMENTED;
  298. }
  299. /* End of implementation class template. */
  300. #endif
  301. #endif /* __gen_nsIDOMWindow_h__ */