2020-07-05 22:00:43 +03: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 22:59:26 +03:00
|
|
|
#include "nsIPaper.idl"
|
2020-11-03 23:35:38 +03:00
|
|
|
#include "nsIPrintSettings.idl"
|
2020-07-05 22:00:43 +03:00
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2020-11-03 23:35:38 +03: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 22:00:43 +03:00
|
|
|
[scriptable, uuid(d2dde9bb-df86-469c-bfcc-fd95a44b1db8)]
|
|
|
|
interface nsIPrinter : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The name of the printer.
|
|
|
|
*/
|
|
|
|
readonly attribute AString name;
|
2020-07-13 22:59:26 +03:00
|
|
|
|
2020-09-16 00:23:27 +03: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 09:11:08 +03:00
|
|
|
/**
|
2020-11-03 23:35:38 +03: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 22:59:26 +03:00
|
|
|
*/
|
2020-08-05 04:24:49 +03:00
|
|
|
[implicit_jscontext]
|
2020-11-03 23:35:38 +03:00
|
|
|
readonly attribute Promise printerInfo;
|
2020-07-24 21:02:22 +03:00
|
|
|
|
|
|
|
/**
|
2020-08-04 15:06:37 +03:00
|
|
|
* Returns a Promise that resolves to true or false to indicate whether this
|
|
|
|
* printer supports duplex printing.
|
2020-07-24 21:02:22 +03:00
|
|
|
*/
|
2020-08-04 15:06:37 +03:00
|
|
|
[implicit_jscontext]
|
|
|
|
readonly attribute Promise supportsDuplex;
|
2020-08-03 14:45:35 +03:00
|
|
|
|
|
|
|
/**
|
2020-08-04 15:06:37 +03:00
|
|
|
* Returns a Promise that resolves to true or false to indicate whether this
|
|
|
|
* printer supports color printing.
|
2020-08-03 14:45:35 +03:00
|
|
|
*/
|
2020-08-04 15:06:37 +03:00
|
|
|
[implicit_jscontext]
|
|
|
|
readonly attribute Promise supportsColor;
|
2020-08-14 23:41:59 +03:00
|
|
|
|
2020-09-07 21:58:48 +03: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 23:41:59 +03: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 22:00:43 +03:00
|
|
|
};
|