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
"nsIPaper.idl"
7 #include
"nsIPrintSettings.idl"
8 #include
"nsISupports.idl"
10 [scriptable
, uuid(855ae9dd
-62a4
-64aa
-9c60
-b1078ff028f1
)]
11 interface nsIPrinterInfo
: nsISupports
14 * An array of nsIPaper instances that represents the available paper sizes.
16 readonly attribute Array
<nsIPaper
> paperList
;
18 * nsIPrintSettings object containing the default settings for a printer.
20 readonly attribute nsIPrintSettings defaultSettings
;
23 [scriptable
, uuid(d2dde9bb
-df86
-469c
-bfcc
-fd95a44b1db8
)]
24 interface nsIPrinter
: nsISupports
27 * The name of the printer.
29 readonly attribute AString name
;
32 * The system name of the printer.
34 * This may be faster for lookup in nsIPrinterList functions, but will only
35 * work for functions that will accept the system name.
37 readonly attribute AString systemName
;
40 * Returns a Promise that resolves to a nsIPrinterInfo.
41 * This will contain the default printer settings, and the list of paper
42 * sizes supported by the printer.
45 readonly attribute Promise printerInfo
;
48 * Returns a Promise that resolves to a new settings object that contains all
49 * of the settings from aSettingsToCopyFrom that are valid for this printer.
50 * Any settings that are not valid for the printer are set to default/fallback
54 Promise copyFromWithValidation
(in nsIPrintSettings aSettingsToCopyFrom
);
57 * Returns a Promise that resolves to true or false to indicate whether this
58 * printer supports duplex printing.
61 readonly attribute Promise supportsDuplex
;
64 * Returns a Promise that resolves to true or false to indicate whether this
65 * printer supports color printing.
68 readonly attribute Promise supportsColor
;
71 * Returns a Promise that resolves to true or false to indicate whether this
72 * printer supports monochrome printing.
75 readonly attribute Promise supportsMonochrome
;
78 * Returns a Promise that resolves to true or false to indicate whether this
79 * printer supports collation.
82 readonly attribute Promise supportsCollation
;