PageRenderTime 104ms CodeModel.GetById 60ms app.highlight 10ms RepoModel.GetById 30ms app.codeStats 0ms

/gecko_api/include/nsIWebBrowserPrint.h

http://firefox-mac-pdf.googlecode.com/
C++ Header | 383 lines | 176 code | 64 blank | 143 comment | 0 complexity | dd25baa75a208352cb4767ff267839bc 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/nsIWebBrowserPrint.idl
  3 */
  4
  5#ifndef __gen_nsIWebBrowserPrint_h__
  6#define __gen_nsIWebBrowserPrint_h__
  7
  8
  9#ifndef __gen_nsISupports_h__
 10#include "nsISupports.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 nsIDOMWindow; /* forward declaration */
 18
 19class nsIPrintSettings; /* forward declaration */
 20
 21class nsIWebProgressListener; /* forward declaration */
 22
 23
 24/* starting interface:    nsIWebBrowserPrint */
 25#define NS_IWEBBROWSERPRINT_IID_STR "9a7ca4b0-fbba-11d4-a869-00105a183419"
 26
 27#define NS_IWEBBROWSERPRINT_IID \
 28  {0x9a7ca4b0, 0xfbba, 0x11d4, \
 29    { 0xa8, 0x69, 0x00, 0x10, 0x5a, 0x18, 0x34, 0x19 }}
 30
 31/**
 32 * nsIWebBrowserPrint corresponds to the main interface
 33 * for printing an embedded Gecko web browser window/document
 34 *
 35 * @status FROZEN
 36 */
 37class NS_NO_VTABLE NS_SCRIPTABLE nsIWebBrowserPrint : public nsISupports {
 38 public: 
 39
 40  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWEBBROWSERPRINT_IID)
 41
 42  /**
 43   * PrintPreview Navigation Constants
 44   */
 45  enum { PRINTPREVIEW_GOTO_PAGENUM = 0 };
 46
 47  enum { PRINTPREVIEW_PREV_PAGE = 1 };
 48
 49  enum { PRINTPREVIEW_NEXT_PAGE = 2 };
 50
 51  enum { PRINTPREVIEW_HOME = 3 };
 52
 53  enum { PRINTPREVIEW_END = 4 };
 54
 55  /**
 56   * Returns a "global" PrintSettings object 
 57   * Creates a new the first time, if one doesn't exist.
 58   *
 59   * Then returns the same object each time after that.
 60   *
 61   * Initializes the globalPrintSettings from the default printer
 62   */
 63  /* readonly attribute nsIPrintSettings globalPrintSettings; */
 64  NS_SCRIPTABLE NS_IMETHOD GetGlobalPrintSettings(nsIPrintSettings * *aGlobalPrintSettings) = 0;
 65
 66  /**
 67   * Returns a pointer to the PrintSettings object that
 68   * that was passed into either "print" or "print preview"
 69   *
 70   * This enables any consumers of the interface to have access
 71   * to the "current" PrintSetting at later points in the execution
 72   */
 73  /* readonly attribute nsIPrintSettings currentPrintSettings; */
 74  NS_SCRIPTABLE NS_IMETHOD GetCurrentPrintSettings(nsIPrintSettings * *aCurrentPrintSettings) = 0;
 75
 76  /**
 77   * Returns a pointer to the current child DOMWindow
 78   * that is being print previewed. (FrameSet Frames)
 79   *
 80   * Returns null if parent document is not a frameset or the entire FrameSet 
 81   * document is being print previewed
 82   *
 83   * This enables any consumers of the interface to have access
 84   * to the "current" child DOMWindow at later points in the execution
 85   */
 86  /* readonly attribute nsIDOMWindow currentChildDOMWindow; */
 87  NS_SCRIPTABLE NS_IMETHOD GetCurrentChildDOMWindow(nsIDOMWindow * *aCurrentChildDOMWindow) = 0;
 88
 89  /**
 90   * Returns whether it is in Print mode
 91   */
 92  /* readonly attribute boolean doingPrint; */
 93  NS_SCRIPTABLE NS_IMETHOD GetDoingPrint(PRBool *aDoingPrint) = 0;
 94
 95  /**
 96   * Returns whether it is in Print Preview mode
 97   */
 98  /* readonly attribute boolean doingPrintPreview; */
 99  NS_SCRIPTABLE NS_IMETHOD GetDoingPrintPreview(PRBool *aDoingPrintPreview) = 0;
100
101  /**
102   * This returns whether the current document is a frameset document
103   */
104  /* readonly attribute boolean isFramesetDocument; */
105  NS_SCRIPTABLE NS_IMETHOD GetIsFramesetDocument(PRBool *aIsFramesetDocument) = 0;
106
107  /**
108   * This returns whether the current document is a frameset document
109   */
110  /* readonly attribute boolean isFramesetFrameSelected; */
111  NS_SCRIPTABLE NS_IMETHOD GetIsFramesetFrameSelected(PRBool *aIsFramesetFrameSelected) = 0;
112
113  /**
114   * This returns whether there is an IFrame selected
115   */
116  /* readonly attribute boolean isIFrameSelected; */
117  NS_SCRIPTABLE NS_IMETHOD GetIsIFrameSelected(PRBool *aIsIFrameSelected) = 0;
118
119  /**
120   * This returns whether there is a "range" selection
121   */
122  /* readonly attribute boolean isRangeSelection; */
123  NS_SCRIPTABLE NS_IMETHOD GetIsRangeSelection(PRBool *aIsRangeSelection) = 0;
124
125  /**
126   * This returns the total number of pages for the Print Preview
127   */
128  /* readonly attribute long printPreviewNumPages; */
129  NS_SCRIPTABLE NS_IMETHOD GetPrintPreviewNumPages(PRInt32 *aPrintPreviewNumPages) = 0;
130
131  /**
132   * Print the specified DOM window
133   *
134   * @param aThePrintSettings - Printer Settings for the print job, if aThePrintSettings is null
135   *                            then the global PS will be used.
136   * @param aWPListener - is updated during the print
137   * @return void
138   */
139  /* void print (in nsIPrintSettings aThePrintSettings, in nsIWebProgressListener aWPListener); */
140  NS_SCRIPTABLE NS_IMETHOD Print(nsIPrintSettings *aThePrintSettings, nsIWebProgressListener *aWPListener) = 0;
141
142  /**
143   * Print Preview the specified DOM window
144   *
145   * @param aThePrintSettings - Printer Settings for the print preview, if aThePrintSettings is null
146   *                            then the global PS will be used.
147   * @param aChildDOMWin - DOM Window of the child document to be PP (FrameSet frames)
148   * @param aWPListener - is updated during the printpreview
149   * @return void
150   */
151  /* void printPreview (in nsIPrintSettings aThePrintSettings, in nsIDOMWindow aChildDOMWin, in nsIWebProgressListener aWPListener); */
152  NS_SCRIPTABLE NS_IMETHOD PrintPreview(nsIPrintSettings *aThePrintSettings, nsIDOMWindow *aChildDOMWin, nsIWebProgressListener *aWPListener) = 0;
153
154  /**
155   * Print Preview - Navigates within the window
156   *
157   * @param aNavType - navigation enum
158   * @param aPageNum - page num to navigate to when aNavType = ePrintPreviewGoToPageNum
159   * @return void
160   */
161  /* void printPreviewNavigate (in short aNavType, in long aPageNum); */
162  NS_SCRIPTABLE NS_IMETHOD PrintPreviewNavigate(PRInt16 aNavType, PRInt32 aPageNum) = 0;
163
164  /**
165   * Cancels the current print 
166   * @return void
167   */
168  /* void cancel (); */
169  NS_SCRIPTABLE NS_IMETHOD Cancel(void) = 0;
170
171  /**
172   * Returns an array of the names of all documents names (Title or URL)
173   * and sub-documents. This will return a single item if the attr "isFramesetDocument" is false
174   * and may return any number of items is "isFramesetDocument" is true
175   *
176   * @param  aCount - returns number of printers returned
177   * @param  aResult - returns array of names
178   * @return void
179   */
180  /* void enumerateDocumentNames (out PRUint32 aCount, [array, size_is (aCount), retval] out wstring aResult); */
181  NS_SCRIPTABLE NS_IMETHOD EnumerateDocumentNames(PRUint32 *aCount, PRUnichar ***aResult) = 0;
182
183  /**
184   * This exists PrintPreview mode and returns browser window to galley mode
185   * @return void
186   */
187  /* void exitPrintPreview (); */
188  NS_SCRIPTABLE NS_IMETHOD ExitPrintPreview(void) = 0;
189
190};
191
192  NS_DEFINE_STATIC_IID_ACCESSOR(nsIWebBrowserPrint, NS_IWEBBROWSERPRINT_IID)
193
194/* Use this macro when declaring classes that implement this interface. */
195#define NS_DECL_NSIWEBBROWSERPRINT \
196  NS_SCRIPTABLE NS_IMETHOD GetGlobalPrintSettings(nsIPrintSettings * *aGlobalPrintSettings); \
197  NS_SCRIPTABLE NS_IMETHOD GetCurrentPrintSettings(nsIPrintSettings * *aCurrentPrintSettings); \
198  NS_SCRIPTABLE NS_IMETHOD GetCurrentChildDOMWindow(nsIDOMWindow * *aCurrentChildDOMWindow); \
199  NS_SCRIPTABLE NS_IMETHOD GetDoingPrint(PRBool *aDoingPrint); \
200  NS_SCRIPTABLE NS_IMETHOD GetDoingPrintPreview(PRBool *aDoingPrintPreview); \
201  NS_SCRIPTABLE NS_IMETHOD GetIsFramesetDocument(PRBool *aIsFramesetDocument); \
202  NS_SCRIPTABLE NS_IMETHOD GetIsFramesetFrameSelected(PRBool *aIsFramesetFrameSelected); \
203  NS_SCRIPTABLE NS_IMETHOD GetIsIFrameSelected(PRBool *aIsIFrameSelected); \
204  NS_SCRIPTABLE NS_IMETHOD GetIsRangeSelection(PRBool *aIsRangeSelection); \
205  NS_SCRIPTABLE NS_IMETHOD GetPrintPreviewNumPages(PRInt32 *aPrintPreviewNumPages); \
206  NS_SCRIPTABLE NS_IMETHOD Print(nsIPrintSettings *aThePrintSettings, nsIWebProgressListener *aWPListener); \
207  NS_SCRIPTABLE NS_IMETHOD PrintPreview(nsIPrintSettings *aThePrintSettings, nsIDOMWindow *aChildDOMWin, nsIWebProgressListener *aWPListener); \
208  NS_SCRIPTABLE NS_IMETHOD PrintPreviewNavigate(PRInt16 aNavType, PRInt32 aPageNum); \
209  NS_SCRIPTABLE NS_IMETHOD Cancel(void); \
210  NS_SCRIPTABLE NS_IMETHOD EnumerateDocumentNames(PRUint32 *aCount, PRUnichar ***aResult); \
211  NS_SCRIPTABLE NS_IMETHOD ExitPrintPreview(void); 
212
213/* Use this macro to declare functions that forward the behavior of this interface to another object. */
214#define NS_FORWARD_NSIWEBBROWSERPRINT(_to) \
215  NS_SCRIPTABLE NS_IMETHOD GetGlobalPrintSettings(nsIPrintSettings * *aGlobalPrintSettings) { return _to GetGlobalPrintSettings(aGlobalPrintSettings); } \
216  NS_SCRIPTABLE NS_IMETHOD GetCurrentPrintSettings(nsIPrintSettings * *aCurrentPrintSettings) { return _to GetCurrentPrintSettings(aCurrentPrintSettings); } \
217  NS_SCRIPTABLE NS_IMETHOD GetCurrentChildDOMWindow(nsIDOMWindow * *aCurrentChildDOMWindow) { return _to GetCurrentChildDOMWindow(aCurrentChildDOMWindow); } \
218  NS_SCRIPTABLE NS_IMETHOD GetDoingPrint(PRBool *aDoingPrint) { return _to GetDoingPrint(aDoingPrint); } \
219  NS_SCRIPTABLE NS_IMETHOD GetDoingPrintPreview(PRBool *aDoingPrintPreview) { return _to GetDoingPrintPreview(aDoingPrintPreview); } \
220  NS_SCRIPTABLE NS_IMETHOD GetIsFramesetDocument(PRBool *aIsFramesetDocument) { return _to GetIsFramesetDocument(aIsFramesetDocument); } \
221  NS_SCRIPTABLE NS_IMETHOD GetIsFramesetFrameSelected(PRBool *aIsFramesetFrameSelected) { return _to GetIsFramesetFrameSelected(aIsFramesetFrameSelected); } \
222  NS_SCRIPTABLE NS_IMETHOD GetIsIFrameSelected(PRBool *aIsIFrameSelected) { return _to GetIsIFrameSelected(aIsIFrameSelected); } \
223  NS_SCRIPTABLE NS_IMETHOD GetIsRangeSelection(PRBool *aIsRangeSelection) { return _to GetIsRangeSelection(aIsRangeSelection); } \
224  NS_SCRIPTABLE NS_IMETHOD GetPrintPreviewNumPages(PRInt32 *aPrintPreviewNumPages) { return _to GetPrintPreviewNumPages(aPrintPreviewNumPages); } \
225  NS_SCRIPTABLE NS_IMETHOD Print(nsIPrintSettings *aThePrintSettings, nsIWebProgressListener *aWPListener) { return _to Print(aThePrintSettings, aWPListener); } \
226  NS_SCRIPTABLE NS_IMETHOD PrintPreview(nsIPrintSettings *aThePrintSettings, nsIDOMWindow *aChildDOMWin, nsIWebProgressListener *aWPListener) { return _to PrintPreview(aThePrintSettings, aChildDOMWin, aWPListener); } \
227  NS_SCRIPTABLE NS_IMETHOD PrintPreviewNavigate(PRInt16 aNavType, PRInt32 aPageNum) { return _to PrintPreviewNavigate(aNavType, aPageNum); } \
228  NS_SCRIPTABLE NS_IMETHOD Cancel(void) { return _to Cancel(); } \
229  NS_SCRIPTABLE NS_IMETHOD EnumerateDocumentNames(PRUint32 *aCount, PRUnichar ***aResult) { return _to EnumerateDocumentNames(aCount, aResult); } \
230  NS_SCRIPTABLE NS_IMETHOD ExitPrintPreview(void) { return _to ExitPrintPreview(); } 
231
232/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
233#define NS_FORWARD_SAFE_NSIWEBBROWSERPRINT(_to) \
234  NS_SCRIPTABLE NS_IMETHOD GetGlobalPrintSettings(nsIPrintSettings * *aGlobalPrintSettings) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetGlobalPrintSettings(aGlobalPrintSettings); } \
235  NS_SCRIPTABLE NS_IMETHOD GetCurrentPrintSettings(nsIPrintSettings * *aCurrentPrintSettings) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentPrintSettings(aCurrentPrintSettings); } \
236  NS_SCRIPTABLE NS_IMETHOD GetCurrentChildDOMWindow(nsIDOMWindow * *aCurrentChildDOMWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentChildDOMWindow(aCurrentChildDOMWindow); } \
237  NS_SCRIPTABLE NS_IMETHOD GetDoingPrint(PRBool *aDoingPrint) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDoingPrint(aDoingPrint); } \
238  NS_SCRIPTABLE NS_IMETHOD GetDoingPrintPreview(PRBool *aDoingPrintPreview) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDoingPrintPreview(aDoingPrintPreview); } \
239  NS_SCRIPTABLE NS_IMETHOD GetIsFramesetDocument(PRBool *aIsFramesetDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsFramesetDocument(aIsFramesetDocument); } \
240  NS_SCRIPTABLE NS_IMETHOD GetIsFramesetFrameSelected(PRBool *aIsFramesetFrameSelected) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsFramesetFrameSelected(aIsFramesetFrameSelected); } \
241  NS_SCRIPTABLE NS_IMETHOD GetIsIFrameSelected(PRBool *aIsIFrameSelected) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsIFrameSelected(aIsIFrameSelected); } \
242  NS_SCRIPTABLE NS_IMETHOD GetIsRangeSelection(PRBool *aIsRangeSelection) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsRangeSelection(aIsRangeSelection); } \
243  NS_SCRIPTABLE NS_IMETHOD GetPrintPreviewNumPages(PRInt32 *aPrintPreviewNumPages) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrintPreviewNumPages(aPrintPreviewNumPages); } \
244  NS_SCRIPTABLE NS_IMETHOD Print(nsIPrintSettings *aThePrintSettings, nsIWebProgressListener *aWPListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->Print(aThePrintSettings, aWPListener); } \
245  NS_SCRIPTABLE NS_IMETHOD PrintPreview(nsIPrintSettings *aThePrintSettings, nsIDOMWindow *aChildDOMWin, nsIWebProgressListener *aWPListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->PrintPreview(aThePrintSettings, aChildDOMWin, aWPListener); } \
246  NS_SCRIPTABLE NS_IMETHOD PrintPreviewNavigate(PRInt16 aNavType, PRInt32 aPageNum) { return !_to ? NS_ERROR_NULL_POINTER : _to->PrintPreviewNavigate(aNavType, aPageNum); } \
247  NS_SCRIPTABLE NS_IMETHOD Cancel(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Cancel(); } \
248  NS_SCRIPTABLE NS_IMETHOD EnumerateDocumentNames(PRUint32 *aCount, PRUnichar ***aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateDocumentNames(aCount, aResult); } \
249  NS_SCRIPTABLE NS_IMETHOD ExitPrintPreview(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ExitPrintPreview(); } 
250
251#if 0
252/* Use the code below as a template for the implementation class for this interface. */
253
254/* Header file */
255class nsWebBrowserPrint : public nsIWebBrowserPrint
256{
257public:
258  NS_DECL_ISUPPORTS
259  NS_DECL_NSIWEBBROWSERPRINT
260
261  nsWebBrowserPrint();
262
263private:
264  ~nsWebBrowserPrint();
265
266protected:
267  /* additional members */
268};
269
270/* Implementation file */
271NS_IMPL_ISUPPORTS1(nsWebBrowserPrint, nsIWebBrowserPrint)
272
273nsWebBrowserPrint::nsWebBrowserPrint()
274{
275  /* member initializers and constructor code */
276}
277
278nsWebBrowserPrint::~nsWebBrowserPrint()
279{
280  /* destructor code */
281}
282
283/* readonly attribute nsIPrintSettings globalPrintSettings; */
284NS_IMETHODIMP nsWebBrowserPrint::GetGlobalPrintSettings(nsIPrintSettings * *aGlobalPrintSettings)
285{
286    return NS_ERROR_NOT_IMPLEMENTED;
287}
288
289/* readonly attribute nsIPrintSettings currentPrintSettings; */
290NS_IMETHODIMP nsWebBrowserPrint::GetCurrentPrintSettings(nsIPrintSettings * *aCurrentPrintSettings)
291{
292    return NS_ERROR_NOT_IMPLEMENTED;
293}
294
295/* readonly attribute nsIDOMWindow currentChildDOMWindow; */
296NS_IMETHODIMP nsWebBrowserPrint::GetCurrentChildDOMWindow(nsIDOMWindow * *aCurrentChildDOMWindow)
297{
298    return NS_ERROR_NOT_IMPLEMENTED;
299}
300
301/* readonly attribute boolean doingPrint; */
302NS_IMETHODIMP nsWebBrowserPrint::GetDoingPrint(PRBool *aDoingPrint)
303{
304    return NS_ERROR_NOT_IMPLEMENTED;
305}
306
307/* readonly attribute boolean doingPrintPreview; */
308NS_IMETHODIMP nsWebBrowserPrint::GetDoingPrintPreview(PRBool *aDoingPrintPreview)
309{
310    return NS_ERROR_NOT_IMPLEMENTED;
311}
312
313/* readonly attribute boolean isFramesetDocument; */
314NS_IMETHODIMP nsWebBrowserPrint::GetIsFramesetDocument(PRBool *aIsFramesetDocument)
315{
316    return NS_ERROR_NOT_IMPLEMENTED;
317}
318
319/* readonly attribute boolean isFramesetFrameSelected; */
320NS_IMETHODIMP nsWebBrowserPrint::GetIsFramesetFrameSelected(PRBool *aIsFramesetFrameSelected)
321{
322    return NS_ERROR_NOT_IMPLEMENTED;
323}
324
325/* readonly attribute boolean isIFrameSelected; */
326NS_IMETHODIMP nsWebBrowserPrint::GetIsIFrameSelected(PRBool *aIsIFrameSelected)
327{
328    return NS_ERROR_NOT_IMPLEMENTED;
329}
330
331/* readonly attribute boolean isRangeSelection; */
332NS_IMETHODIMP nsWebBrowserPrint::GetIsRangeSelection(PRBool *aIsRangeSelection)
333{
334    return NS_ERROR_NOT_IMPLEMENTED;
335}
336
337/* readonly attribute long printPreviewNumPages; */
338NS_IMETHODIMP nsWebBrowserPrint::GetPrintPreviewNumPages(PRInt32 *aPrintPreviewNumPages)
339{
340    return NS_ERROR_NOT_IMPLEMENTED;
341}
342
343/* void print (in nsIPrintSettings aThePrintSettings, in nsIWebProgressListener aWPListener); */
344NS_IMETHODIMP nsWebBrowserPrint::Print(nsIPrintSettings *aThePrintSettings, nsIWebProgressListener *aWPListener)
345{
346    return NS_ERROR_NOT_IMPLEMENTED;
347}
348
349/* void printPreview (in nsIPrintSettings aThePrintSettings, in nsIDOMWindow aChildDOMWin, in nsIWebProgressListener aWPListener); */
350NS_IMETHODIMP nsWebBrowserPrint::PrintPreview(nsIPrintSettings *aThePrintSettings, nsIDOMWindow *aChildDOMWin, nsIWebProgressListener *aWPListener)
351{
352    return NS_ERROR_NOT_IMPLEMENTED;
353}
354
355/* void printPreviewNavigate (in short aNavType, in long aPageNum); */
356NS_IMETHODIMP nsWebBrowserPrint::PrintPreviewNavigate(PRInt16 aNavType, PRInt32 aPageNum)
357{
358    return NS_ERROR_NOT_IMPLEMENTED;
359}
360
361/* void cancel (); */
362NS_IMETHODIMP nsWebBrowserPrint::Cancel()
363{
364    return NS_ERROR_NOT_IMPLEMENTED;
365}
366
367/* void enumerateDocumentNames (out PRUint32 aCount, [array, size_is (aCount), retval] out wstring aResult); */
368NS_IMETHODIMP nsWebBrowserPrint::EnumerateDocumentNames(PRUint32 *aCount, PRUnichar ***aResult)
369{
370    return NS_ERROR_NOT_IMPLEMENTED;
371}
372
373/* void exitPrintPreview (); */
374NS_IMETHODIMP nsWebBrowserPrint::ExitPrintPreview()
375{
376    return NS_ERROR_NOT_IMPLEMENTED;
377}
378
379/* End of implementation class template. */
380#endif
381
382
383#endif /* __gen_nsIWebBrowserPrint_h__ */