Add copy of .ttf font with .eot extension for testing
[wine-gecko.git] / widget / public / nsIPrintSettingsService.idl
blob29f51ad5b879e8c80db38c40505183aee45b5843
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 2001
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
24 * Alternatively, the contents of this file may be used under the terms of
25 * either of the GNU General Public License Version 2 or later (the "GPL"),
26 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
38 /* Interface to the Service for gwetting the Global PrintSettings object
39 or a unique PrintSettings object
42 #include "nsISupports.idl"
44 interface nsIPrintSettings;
46 [scriptable, uuid(841387C8-72E6-484b-9296-BF6EEA80D58A)]
47 interface nsIPrintSettingsService : nsISupports
49 /**
50 * Returns a "global" PrintSettings object
51 * Creates a new the first time, if one doesn't exist.
53 * Then returns the same object each time after that.
55 * Initializes the globalPrintSettings from the default printer
57 readonly attribute nsIPrintSettings globalPrintSettings;
59 /**
60 * Returns a new, unique PrintSettings object each time.
62 * For example, if each browser was to have its own unique
63 * PrintSettings, then each browser window would call this to
64 * create its own unique PrintSettings object.
66 * If each browse window was to use the same PrintSettings object
67 * then it should use "globalPrintSettings"
69 * Initializes the newPrintSettings from the default printer
72 readonly attribute nsIPrintSettings newPrintSettings;
74 /**
75 * The name of the last printer used, or else the system default printer.
77 readonly attribute wstring defaultPrinterName;
79 /**
80 * Initializes certain settings from the native printer into the PrintSettings
81 * if aPrinterName is null then it uses the default printer name if it can
82 * These settings include, but are not limited to:
83 * Page Orientation
84 * Page Size
85 * Number of Copies
87 void initPrintSettingsFromPrinter(in wstring aPrinterName, in nsIPrintSettings aPrintSettings);
89 /**
90 * Reads PrintSettings values from Prefs,
91 * the values to be read are indicated by the "flags" arg.
93 * aPrintSettings should be initialized with the name of a printer. First
94 * it reads in the PrintSettings from the last print job. Then it uses the
95 * PrinterName in the PrinterSettings to read any settings that were saved
96 * just for that printer.
98 * aPS - PrintSettings to have its settings read
99 * aUsePrinterNamePrefix - indicates whether to use the printer name as a prefix
100 * aFlags - indicates which prefs to read, see nsIPrintSettings.idl for the
101 * const values.
103 * Items not read:
104 * startPageRange, endPageRange, scaling, printRange, title
105 * docURL, howToEnableFrameUI, isCancelled, printFrameTypeUsage
106 * printFrameType, printSilent, shrinkToFit, numCopies,
107 * printerName
110 void initPrintSettingsFromPrefs(in nsIPrintSettings aPrintSettings, in boolean aUsePrinterNamePrefix, in unsigned long aFlags);
113 * Writes PrintSettings values to Prefs,
114 * the values to be written are indicated by the "flags" arg.
116 * If there is no PrinterName in the PrinterSettings
117 * the values are saved as the "generic" values not associated with any printer.
118 * If a PrinterName is there, then it saves the items qualified for that Printer
120 * aPS - PrintSettings to have its settings saved
121 * aUsePrinterNamePrefix - indicates whether to use the printer name as a prefix
122 * aFlags - indicates which prefs to save, see nsIPrintSettings.idl for the const values.
124 * Items not written:
125 * startPageRange, endPageRange, scaling, printRange, title
126 * docURL, howToEnableFrameUI, isCancelled, printFrameTypeUsage
127 * printFrameType, printSilent, shrinkToFit, numCopies
130 void savePrintSettingsToPrefs(in nsIPrintSettings aPrintSettings, in boolean aUsePrinterNamePrefix, in unsigned long aFlags);
134 %{C++
135 // {841387C8-72E6-484b-9296-BF6EEA80D58A}
136 #define NS_PRINTSETTINGSSERVICE_IID \
137 {0x841387c8, 0x72e6, 0x484b, { 0x92, 0x96, 0xbf, 0x6e, 0xea, 0x80, 0xd5, 0x8a}}