Bug 545431, fix versioning of mac sdks, r=ted.mielczarek
[gecko.git] / embedding / browser / webBrowser / nsIWebBrowserPrint.idl
blobc85b39b15643a63b3d8b82cc0b593f2e6aa82534
1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
16 * The Original Code is the Mozilla browser.
18 * The Initial Developer of the Original Code is
19 * Netscape Communications, Inc.
20 * Portions created by the Initial Developer are Copyright (C) 1999
21 * the Initial Developer. All Rights Reserved.
23 * Contributor(s):
24 * Don Cone <dcone@netscape.com>
25 * Rod Spears <rods@netscape.com>
27 * Alternatively, the contents of this file may be used under the terms of
28 * either the GNU General Public License Version 2 or later (the "GPL"), or
29 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30 * in which case the provisions of the GPL or the LGPL are applicable instead
31 * of those above. If you wish to allow use of your version of this file only
32 * under the terms of either the GPL or the LGPL, and not to allow others to
33 * use your version of this file under the terms of the MPL, indicate your
34 * decision by deleting the provisions above and replace them with the notice
35 * and other provisions required by the GPL or the LGPL. If you do not delete
36 * the provisions above, a recipient may use your version of this file under
37 * the terms of any one of the MPL, the GPL or the LGPL.
39 * ***** END LICENSE BLOCK ***** */
41 #include "nsISupports.idl"
43 interface nsIDOMWindow;
44 interface nsIPrintSettings;
45 interface nsIWebProgressListener;
47 /**
48 * nsIWebBrowserPrint corresponds to the main interface
49 * for printing an embedded Gecko web browser window/document
51 * @status FROZEN
53 [scriptable, uuid(9A7CA4B0-FBBA-11d4-A869-00105A183419)]
54 interface nsIWebBrowserPrint : nsISupports
56 /**
57 * PrintPreview Navigation Constants
59 const short PRINTPREVIEW_GOTO_PAGENUM = 0;
60 const short PRINTPREVIEW_PREV_PAGE = 1;
61 const short PRINTPREVIEW_NEXT_PAGE = 2;
62 const short PRINTPREVIEW_HOME = 3;
63 const short PRINTPREVIEW_END = 4;
65 /**
66 * Returns a "global" PrintSettings object
67 * Creates a new the first time, if one doesn't exist.
69 * Then returns the same object each time after that.
71 * Initializes the globalPrintSettings from the default printer
73 readonly attribute nsIPrintSettings globalPrintSettings;
75 /**
76 * Returns a pointer to the PrintSettings object that
77 * that was passed into either "print" or "print preview"
79 * This enables any consumers of the interface to have access
80 * to the "current" PrintSetting at later points in the execution
82 readonly attribute nsIPrintSettings currentPrintSettings;
84 /**
85 * Returns a pointer to the current child DOMWindow
86 * that is being print previewed. (FrameSet Frames)
88 * Returns null if parent document is not a frameset or the entire FrameSet
89 * document is being print previewed
91 * This enables any consumers of the interface to have access
92 * to the "current" child DOMWindow at later points in the execution
94 readonly attribute nsIDOMWindow currentChildDOMWindow;
96 /**
97 * Returns whether it is in Print mode
99 readonly attribute boolean doingPrint;
102 * Returns whether it is in Print Preview mode
104 readonly attribute boolean doingPrintPreview;
107 * This returns whether the current document is a frameset document
109 readonly attribute boolean isFramesetDocument;
112 * This returns whether the current document is a frameset document
114 readonly attribute boolean isFramesetFrameSelected;
117 * This returns whether there is an IFrame selected
119 readonly attribute boolean isIFrameSelected;
122 * This returns whether there is a "range" selection
124 readonly attribute boolean isRangeSelection;
127 * This returns the total number of pages for the Print Preview
129 readonly attribute long printPreviewNumPages;
132 * Print the specified DOM window
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
139 void print(in nsIPrintSettings aThePrintSettings,
140 in nsIWebProgressListener aWPListener);
143 * Print Preview the specified DOM window
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 to be print previewed.
148 * @param aWPListener - is updated during the printpreview
149 * @return void
151 void printPreview(in nsIPrintSettings aThePrintSettings,
152 in nsIDOMWindow aChildDOMWin,
153 in nsIWebProgressListener aWPListener);
156 * Print Preview - Navigates within the window
158 * @param aNavType - navigation enum
159 * @param aPageNum - page num to navigate to when aNavType = ePrintPreviewGoToPageNum
160 * @return void
162 void printPreviewNavigate(in short aNavType, in long aPageNum);
165 * Cancels the current print
166 * @return void
168 void cancel();
171 * Returns an array of the names of all documents names (Title or URL)
172 * and sub-documents. This will return a single item if the attr "isFramesetDocument" is false
173 * and may return any number of items is "isFramesetDocument" is true
175 * @param aCount - returns number of printers returned
176 * @param aResult - returns array of names
177 * @return void
179 void enumerateDocumentNames(out PRUint32 aCount,[retval, array, size_is(aCount)] out wstring aResult);
182 * This exists PrintPreview mode and returns browser window to galley mode
183 * @return void
185 void exitPrintPreview();