summaryrefslogtreecommitdiffstats
path: root/widget/nsIPrinter.idl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /widget/nsIPrinter.idl
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'widget/nsIPrinter.idl')
-rw-r--r--widget/nsIPrinter.idl83
1 files changed, 83 insertions, 0 deletions
diff --git a/widget/nsIPrinter.idl b/widget/nsIPrinter.idl
new file mode 100644
index 0000000000..d95671f681
--- /dev/null
+++ b/widget/nsIPrinter.idl
@@ -0,0 +1,83 @@
+/* -*- 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 "nsIPrintSettings.idl"
+#include "nsISupports.idl"
+
+[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;
+};
+
+[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;
+
+ /**
+ * 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.
+ */
+ [implicit_jscontext]
+ readonly attribute Promise printerInfo;
+
+ /**
+ * 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);
+
+ /**
+ * 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;
+};