gecko-dev/widget/nsIPrinter.idl
Emilio Cobos Álvarez 6d5ce8f732 Bug 1655558 - Retrieve paper information from CUPS, and convert paperList to an async attribute. r=jwatt
This builds on top of bug 1656146 to compute the page information on a
background task, and return it via a promise.

Co-Authored-By: Erik Nordin <enordin@mozilla.com>

Differential Revision: https://phabricator.services.mozilla.com/D85865
2020-08-05 01:24:49 +00:00

39 lines
1.1 KiB
Plaintext

/* -*- 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;
/**
* 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;
};