Source code

Revision control

Other Tools

/* -*- 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/. */
#include "nsIPaper.idl"
#include "nsISupports.idl"
[scriptable, uuid(d2dde9bb-df86-469c-bfcc-fd95a44b1db8)]
interface nsIPrinter : nsISupports
{
/**
* The name of the printer.
*/
readonly attribute AString name;
/**
* 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;
/**
* Creates a Promise that will resolve to an nsIPrintSettings object containing
* the default settings for this printer. For convenience, a new, mutable
* nsIPrintSettings object is created for each call.
*/
[implicit_jscontext]
Promise createDefaultSettings();
/**
* Returns a Promise that resolves to an array of
* nsIPaper instances with the list of available paper
* sizes.
*/
[implicit_jscontext]
readonly attribute Promise paperList;
/**
* Returns a Promise that resolves to true or false to indicate whether this
* printer supports duplex printing.
*/
[implicit_jscontext]
readonly attribute Promise supportsDuplex;
/**
* Returns a Promise that resolves to true or false to indicate whether this
* printer supports color printing.
*/
[implicit_jscontext]
readonly attribute Promise supportsColor;
/**
* Returns a Promise that resolves to true or false to indicate whether this
* printer supports monochrome printing.
*/
[implicit_jscontext]
readonly attribute Promise supportsMonochrome;
/**
* Returns a Promise that resolves to true or false to indicate whether this
* printer supports collation.
*/
[implicit_jscontext]
readonly attribute Promise supportsCollation;
};