2020-07-05 19:00:43 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
2020-07-13 19:59:26 +00:00
|
|
|
#include "nsIPaper.idl"
|
2020-11-03 20:35:38 +00:00
|
|
|
#include "nsIPrintSettings.idl"
|
2020-07-05 19:00:43 +00:00
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2020-11-03 20:35:38 +00:00
|
|
|
[scriptable, uuid(855ae9dd-62a4-64aa-9c60-b1078ff028f1)]
|
|
|
|
interface nsIPrinterInfo : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* An array of nsIPaper instances that represents the available paper sizes.
|
|
|
|
*/
|
|
|
|
readonly attribute Array<nsIPaper> paperList;
|
|
|
|
/**
|
|
|
|
* nsIPrintSettings object containing the default settings for a printer.
|
|
|
|
*/
|
|
|
|
readonly attribute nsIPrintSettings defaultSettings;
|
|
|
|
};
|
|
|
|
|
2020-07-05 19:00:43 +00:00
|
|
|
[scriptable, uuid(d2dde9bb-df86-469c-bfcc-fd95a44b1db8)]
|
|
|
|
interface nsIPrinter : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The name of the printer.
|
|
|
|
*/
|
|
|
|
readonly attribute AString name;
|
2020-07-13 19:59:26 +00:00
|
|
|
|
2020-09-15 21:23:27 +00:00
|
|
|
/**
|
|
|
|
* The system name of the printer.
|
|
|
|
*
|
|
|
|
* This may be faster for lookup in nsIPrinterList functions, but will only
|
|
|
|
* work for functions that will accept the system name.
|
|
|
|
*/
|
|
|
|
readonly attribute AString systemName;
|
|
|
|
|
2020-08-20 06:11:08 +00:00
|
|
|
/**
|
2020-11-03 20:35:38 +00:00
|
|
|
* Returns a Promise that resolves to a nsIPrinterInfo.
|
|
|
|
* This will contain the default printer settings, and the list of paper
|
|
|
|
* sizes supported by the printer.
|
2020-07-13 19:59:26 +00:00
|
|
|
*/
|
2020-08-05 01:24:49 +00:00
|
|
|
[implicit_jscontext]
|
2020-11-03 20:35:38 +00:00
|
|
|
readonly attribute Promise printerInfo;
|
2020-07-24 18:02:22 +00:00
|
|
|
|
2021-11-16 08:17:02 +00:00
|
|
|
/**
|
|
|
|
* Returns a Promise that resolves to a new settings object that contains all
|
|
|
|
* of the settings from aSettingsToCopyFrom that are valid for this printer.
|
|
|
|
* Any settings that are not valid for the printer are set to default/fallback
|
|
|
|
* values.
|
|
|
|
*/
|
|
|
|
[implicit_jscontext]
|
|
|
|
Promise copyFromWithValidation(in nsIPrintSettings aSettingsToCopyFrom);
|
|
|
|
|
2020-07-24 18:02:22 +00:00
|
|
|
/**
|
2020-08-04 12:06:37 +00:00
|
|
|
* Returns a Promise that resolves to true or false to indicate whether this
|
|
|
|
* printer supports duplex printing.
|
2020-07-24 18:02:22 +00:00
|
|
|
*/
|
2020-08-04 12:06:37 +00:00
|
|
|
[implicit_jscontext]
|
|
|
|
readonly attribute Promise supportsDuplex;
|
2020-08-03 11:45:35 +00:00
|
|
|
|
|
|
|
/**
|
2020-08-04 12:06:37 +00:00
|
|
|
* Returns a Promise that resolves to true or false to indicate whether this
|
|
|
|
* printer supports color printing.
|
2020-08-03 11:45:35 +00:00
|
|
|
*/
|
2020-08-04 12:06:37 +00:00
|
|
|
[implicit_jscontext]
|
|
|
|
readonly attribute Promise supportsColor;
|
2020-08-14 20:41:59 +00:00
|
|
|
|
2020-09-07 18:58:48 +00:00
|
|
|
/**
|
|
|
|
* Returns a Promise that resolves to true or false to indicate whether this
|
|
|
|
* printer supports monochrome printing.
|
|
|
|
*/
|
|
|
|
[implicit_jscontext]
|
|
|
|
readonly attribute Promise supportsMonochrome;
|
|
|
|
|
2020-08-14 20:41:59 +00:00
|
|
|
/**
|
|
|
|
* Returns a Promise that resolves to true or false to indicate whether this
|
|
|
|
* printer supports collation.
|
|
|
|
*/
|
|
|
|
[implicit_jscontext]
|
|
|
|
readonly attribute Promise supportsCollation;
|
2020-07-05 19:00:43 +00:00
|
|
|
};
|