2020-07-13 22:59:26 +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/. */
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
[scriptable, uuid(a4dd9675-6311-45a9-a547-44e0127304a6)]
|
|
|
|
interface nsIPaper : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
2020-09-17 23:05:08 +03:00
|
|
|
* The internal name of the paper (a fixed, non-localized ID).
|
|
|
|
* (For CUPS, this is the PWG-standardized name as used internally by CUPS;
|
|
|
|
* on Windows, it is the integer paper ID as a string.)
|
|
|
|
*/
|
|
|
|
readonly attribute AString id;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The human-readable (potentially localized) name of the paper.
|
2020-07-13 22:59:26 +03:00
|
|
|
*/
|
|
|
|
readonly attribute AString name;
|
|
|
|
|
|
|
|
/**
|
2020-08-18 20:58:53 +03:00
|
|
|
* The width of the paper assuming portrait orientation, in points.
|
|
|
|
* That is, the length of the shorter edges of the paper.
|
2020-07-13 22:59:26 +03:00
|
|
|
*/
|
|
|
|
readonly attribute double width;
|
|
|
|
|
|
|
|
/**
|
2020-08-18 20:58:53 +03:00
|
|
|
* The height of the paper assuming portrait orientation, in points.
|
|
|
|
* That is, the length of the longer edges of the paper.
|
2020-07-13 22:59:26 +03:00
|
|
|
*/
|
|
|
|
readonly attribute double height;
|
2020-07-15 21:38:08 +03:00
|
|
|
|
2020-08-18 20:58:53 +03:00
|
|
|
/**
|
|
|
|
* The Promise resolves with an nsIPaperMargin object. The margin widths contained
|
|
|
|
* in that object's top/bottom/left/right properties are relative to the paper in
|
2020-09-17 23:05:08 +03:00
|
|
|
* portrait orientation. That is, top and bottom are the margins for the short edges,
|
2020-08-18 20:58:53 +03:00
|
|
|
* and left and right are the margins for the long edges.
|
|
|
|
*/
|
2020-08-05 14:26:13 +03:00
|
|
|
[implicit_jscontext] readonly attribute Promise unwriteableMargin;
|
2020-07-13 22:59:26 +03:00
|
|
|
};
|