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