Bumping manifests a=b2g-bump
[gecko.git] / widget / nsIPrintOptions.idl
blobc056e7bb29017d9c3f9c2144e0aa06a62dfad3e6
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
7 #include "nsIPrintSettings.idl"
9 %{ C++
10 struct nsFont;
12 namespace mozilla {
13 namespace embedding {
14 class PrintData;
19 interface nsIStringEnumerator;
20 interface nsIWebBrowserPrint;
22 /**
23 * Native types
25 [ref] native nsNativeFontRef(nsFont);
26 [ref] native PrintDataRef(const mozilla::embedding::PrintData);
27 [ptr] native PrintDataPtr(mozilla::embedding::PrintData);
29 /**
30 * Print options interface
32 * Do not attempt to freeze this API - it still needs lots of work. Consult
33 * John Keiser <jkeiser@netscape.com> and Roland Mainz
34 * <roland.mainz@informatik.med.uni-giessen.de> for futher details.
36 [scriptable, uuid(2ac74034-700e-40fd-8059-81d33223af58)]
38 interface nsIPrintOptions : nsISupports
40 /**
41 * Show Native Print Options dialog, this may not be supported on all platforms
43 void ShowPrintSetupDialog(in nsIPrintSettings aThePrintSettings);
45 /**
46 * Creates a new PrintSettnigs Object
47 * and initializes it from prefs
49 nsIPrintSettings CreatePrintSettings();
51 /**
52 * Get a prefixed integer pref
54 int32_t getPrinterPrefInt(in nsIPrintSettings aPrintSettings, in wstring
55 aPrefName);
57 /**
58 * display Printer Job Properties dialog
60 void displayJobProperties (in wstring aPrinter, in nsIPrintSettings
61 aPrintSettings, out boolean aDisplayed);
63 /**
64 * Native data constants
66 const short kNativeDataPrintRecord = 0;
68 [noscript] voidPtr GetNativeData(in short aDataType);
70 /**
71 * Given some nsIPrintSettings and (optionally) an nsIWebBrowserPrint, populates
72 * a PrintData representing them which can be sent over IPC. Values are only
73 * ever read from aSettings and aWBP.
75 * @param aSettings
76 * An nsIPrintSettings for a print job.
77 * @param aWBP (optional)
78 * The nsIWebBrowserPrint for the print job.
79 * @param data
80 * Pointer to a pre-existing PrintData to populate.
82 * @return nsresult
84 [noscript] void SerializeToPrintData(in nsIPrintSettings aPrintSettings,
85 in nsIWebBrowserPrint aWebBrowserPrint,
86 in PrintDataPtr data);
88 /**
89 * This function is the opposite of SerializeToPrintData, in that it takes
90 * a PrintData, and populates a pre-existing nsIPrintSettings with the data
91 * from PrintData.
93 * @param PrintData
94 * Printing information sent through IPC.
95 * @param settings
96 * A pre-existing nsIPrintSettings to populate with the PrintData.
98 * @return nsresult
100 [noscript] void DeserializeToPrintSettings(in PrintDataRef data,
101 in nsIPrintSettings aPrintSettings);
104 [scriptable, uuid(5e738fff-404c-4c94-9189-e8f2cce93e94)]
106 interface nsIPrinterEnumerator : nsISupports
109 * The name of the system default printer. This name should also be
110 * present in printerNameList below. This is not necessarily gecko's
111 * default printer; see nsIPrintSettingsService.defaultPrinterName
112 * for that.
114 readonly attribute wstring defaultPrinterName;
117 * Initializes certain settings from the native printer into the PrintSettings
118 * These settings include, but are not limited to:
119 * Page Orientation
120 * Page Size
121 * Number of Copies
123 void initPrintSettingsFromPrinter(in wstring aPrinterName, in nsIPrintSettings aPrintSettings);
126 * The list of printer names
128 readonly attribute nsIStringEnumerator printerNameList;
130 /* takes printer selected and will display job properties dlg for that printer
131 * returns true if dialog displays
133 void displayPropertiesDlg(in wstring aPrinter, in nsIPrintSettings aPrintSettings);