diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /widget/gtk/nsPSPrinters.h | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'widget/gtk/nsPSPrinters.h')
-rw-r--r-- | widget/gtk/nsPSPrinters.h | 53 |
1 files changed, 53 insertions, 0 deletions
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 <type>/<name>, + * where <type> is a printer type string, and <name> 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<nsCString>& 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 <type> portion as described for GetPrinterList(). + * @return The PrinterType value for this name. + */ + static PrinterType GetPrinterType(const nsACString& aName); +}; + +#endif /* nsPSPrinters_h___ */ |