Bumping manifests a=b2g-bump
[gecko.git] / widget / nsIPrintSettingsService.idl
blob1cd5dfd1e514f8057757891ed53570ddf7321671
1 /* -*- Mode: C++; tab-width: 2; 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 /* Interface to the Service for gwetting the Global PrintSettings object
7 or a unique PrintSettings object
8 */
10 #include "nsISupports.idl"
12 interface nsIPrintSettings;
14 [scriptable, uuid(841387C8-72E6-484b-9296-BF6EEA80D58A)]
15 interface nsIPrintSettingsService : nsISupports
17 /**
18 * Returns a "global" PrintSettings object
19 * Creates a new the first time, if one doesn't exist.
21 * Then returns the same object each time after that.
23 * Initializes the globalPrintSettings from the default printer
25 readonly attribute nsIPrintSettings globalPrintSettings;
27 /**
28 * Returns a new, unique PrintSettings object each time.
30 * For example, if each browser was to have its own unique
31 * PrintSettings, then each browser window would call this to
32 * create its own unique PrintSettings object.
34 * If each browse window was to use the same PrintSettings object
35 * then it should use "globalPrintSettings"
37 * Initializes the newPrintSettings from the default printer
40 readonly attribute nsIPrintSettings newPrintSettings;
42 /**
43 * The name of the last printer used, or else the system default printer.
45 readonly attribute wstring defaultPrinterName;
47 /**
48 * Initializes certain settings from the native printer into the PrintSettings
49 * if aPrinterName is null then it uses the default printer name if it can
50 * These settings include, but are not limited to:
51 * Page Orientation
52 * Page Size
53 * Number of Copies
55 void initPrintSettingsFromPrinter(in wstring aPrinterName, in nsIPrintSettings aPrintSettings);
57 /**
58 * Reads PrintSettings values from Prefs,
59 * the values to be read are indicated by the "flags" arg.
61 * aPrintSettings should be initialized with the name of a printer. First
62 * it reads in the PrintSettings from the last print job. Then it uses the
63 * PrinterName in the PrinterSettings to read any settings that were saved
64 * just for that printer.
66 * aPS - PrintSettings to have its settings read
67 * aUsePrinterNamePrefix - indicates whether to use the printer name as a prefix
68 * aFlags - indicates which prefs to read, see nsIPrintSettings.idl for the
69 * const values.
71 * Items not read:
72 * startPageRange, endPageRange, scaling, printRange, title
73 * docURL, howToEnableFrameUI, isCancelled, printFrameTypeUsage
74 * printFrameType, printSilent, shrinkToFit, numCopies,
75 * printerName
78 void initPrintSettingsFromPrefs(in nsIPrintSettings aPrintSettings, in boolean aUsePrinterNamePrefix, in unsigned long aFlags);
80 /**
81 * Writes PrintSettings values to Prefs,
82 * the values to be written are indicated by the "flags" arg.
84 * If there is no PrinterName in the PrinterSettings
85 * the values are saved as the "generic" values not associated with any printer.
86 * If a PrinterName is there, then it saves the items qualified for that Printer
88 * aPS - PrintSettings to have its settings saved
89 * aUsePrinterNamePrefix - indicates whether to use the printer name as a prefix
90 * aFlags - indicates which prefs to save, see nsIPrintSettings.idl for the const values.
92 * Items not written:
93 * startPageRange, endPageRange, scaling, printRange, title
94 * docURL, howToEnableFrameUI, isCancelled, printFrameTypeUsage
95 * printFrameType, printSilent, shrinkToFit, numCopies
98 void savePrintSettingsToPrefs(in nsIPrintSettings aPrintSettings, in boolean aUsePrinterNamePrefix, in unsigned long aFlags);
102 %{C++
103 // {841387C8-72E6-484b-9296-BF6EEA80D58A}
104 #define NS_PRINTSETTINGSSERVICE_IID \
105 {0x841387c8, 0x72e6, 0x484b, { 0x92, 0x96, 0xbf, 0x6e, 0xea, 0x80, 0xd5, 0x8a}}