diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /toolkit/components/printingui | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | toolkit/components/printingui/ipc/PPrintingTypes.ipdlh | 100 | ||||
-rw-r--r-- | toolkit/components/printingui/ipc/moz.build | 13 | ||||
-rw-r--r-- | toolkit/components/printingui/moz.build | 12 |
3 files changed, 125 insertions, 0 deletions
diff --git a/toolkit/components/printingui/ipc/PPrintingTypes.ipdlh b/toolkit/components/printingui/ipc/PPrintingTypes.ipdlh new file mode 100644 index 0000000000..73abd250ab --- /dev/null +++ b/toolkit/components/printingui/ipc/PPrintingTypes.ipdlh @@ -0,0 +1,100 @@ +/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */ +/* 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 protocol PRemotePrintJob; + +namespace mozilla { +namespace embedding { + +struct CStringKeyValue { + nsCString key; + nsCString value; +}; + +struct PrintData { + nullable PRemotePrintJob remotePrintJob; + double edgeTop; + double edgeLeft; + double edgeBottom; + double edgeRight; + double marginTop; + double marginLeft; + double marginBottom; + double marginRight; + double unwriteableMarginTop; + double unwriteableMarginLeft; + double unwriteableMarginBottom; + double unwriteableMarginRight; + double scaling; + bool printBGColors; + bool printBGImages; + bool honorPageRuleMargins; + bool usePageRuleSizeAsPaperSize; + bool ignoreUnwriteableMargins; + bool showMarginGuides; + bool printSelectionOnly; + int32_t[] pageRanges; + nsString title; + nsString docURL; + nsString headerStrLeft; + nsString headerStrCenter; + nsString headerStrRight; + nsString footerStrLeft; + nsString footerStrCenter; + nsString footerStrRight; + + bool printSilent; + bool shrinkToFit; + + nsString paperId; + double paperWidth; + double paperHeight; + short paperSizeUnit; + bool printReversed; + bool printInColor; + int32_t orientation; + int32_t numCopies; + int32_t numPagesPerSheet; + + // We do not transfer the following to the child process, since the child + // process should not need this information, and we don't want to leak it if + // the child process is compromised. + //nsString printerName; + //nsString toFileName; + + // TODO: Do we really need to deal with these in child processes? + short outputDestination; + short outputFormat; + + int32_t printPageDelay; + int32_t resolution; + int32_t duplex; + bool isInitializedFromPrinter; + bool isInitializedFromPrefs; + + /* Windows-specific things */ + nsString driverName; + nsString deviceName; + uint8_t[] devModeData; + + /** + * GTK-specific things. Some of these might look like dupes of the + * information we're already passing, but the generalized settings that + * we hold in nsIPrintSettings don't map perfectly to GTK's GtkPrintSettings, + * so there are some nuances. GtkPrintSettings, for example, stores both an + * internal name for paper size, as well as the display name. + */ + CStringKeyValue[] GTKPrintSettings; + + /* + * macOS-specific things: + * What the Cocoa print system is supposed to do with the job. + */ + nsString disposition; + uint16_t destination; +}; + +} // namespace embedding +} // namespace mozilla diff --git a/toolkit/components/printingui/ipc/moz.build b/toolkit/components/printingui/ipc/moz.build new file mode 100644 index 0000000000..99ff60c0e6 --- /dev/null +++ b/toolkit/components/printingui/ipc/moz.build @@ -0,0 +1,13 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# 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/. + +IPDL_SOURCES += [ + "PPrintingTypes.ipdlh", +] + +include("/ipc/chromium/chromium-config.mozbuild") + +FINAL_LIBRARY = "xul" diff --git a/toolkit/components/printingui/moz.build b/toolkit/components/printingui/moz.build new file mode 100644 index 0000000000..5a91ca28dc --- /dev/null +++ b/toolkit/components/printingui/moz.build @@ -0,0 +1,12 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# 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/. + +with Files("**"): + BUG_COMPONENT = ("Toolkit", "Printing") + +DIRS += ["ipc"] + +FINAL_LIBRARY = "xul" |