From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- widget/gtk/nsPSPrinters.h | 53 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 widget/gtk/nsPSPrinters.h (limited to 'widget/gtk/nsPSPrinters.h') diff --git a/widget/gtk/nsPSPrinters.h b/widget/gtk/nsPSPrinters.h new file mode 100644 index 000000000..b584ef715 --- /dev/null +++ b/widget/gtk/nsPSPrinters.h @@ -0,0 +1,53 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ex: set tabstop=8 softtabstop=4 shiftwidth=4 expandtab: */ +/* 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/. */ + +#ifndef nsPSPrinters_h___ +#define nsPSPrinters_h___ + +#include "nsString.h" +#include "nsTArray.h" + +class nsPSPrinterList { + public: + nsPSPrinterList(); + + /** + * Is the PostScript module enabled or disabled? + * @return true if enabled, + * false if not. + */ + bool Enabled(); + + /** + * Obtain a list of printers (print destinations) supported by the + * PostScript module, Each entry will be in the form /, + * where is a printer type string, and is the actual + * printer name. + * + * @param aList Upon return, this is populated with the list of + * printer names as described above, replacing any + * previous contents. Each entry is a UTF8 string. + * There should always be at least one entry. The + * first entry is the default print destination. + */ + void GetPrinterList(nsTArray& aList); + + enum PrinterType { + kTypeUnknown, // Not actually handled by the PS module + kTypePS, // Generic postscript module printer + kTypeCUPS // CUPS printer + }; + + /** + * Identify a printer's type from its name. + * @param aName The printer's full name as a UTF8 string, including + * the portion as described for GetPrinterList(). + * @return The PrinterType value for this name. + */ + static PrinterType GetPrinterType(const nsACString& aName); +}; + +#endif /* nsPSPrinters_h___ */ -- cgit v1.2.3