Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsISupports.idl" |
michael@0 | 7 | #include "nsIPrintSettings.idl" |
michael@0 | 8 | |
michael@0 | 9 | %{ C++ |
michael@0 | 10 | struct nsFont; |
michael@0 | 11 | %} |
michael@0 | 12 | |
michael@0 | 13 | interface nsIStringEnumerator; |
michael@0 | 14 | |
michael@0 | 15 | /** |
michael@0 | 16 | * Native types |
michael@0 | 17 | */ |
michael@0 | 18 | [ref] native nsNativeFontRef(nsFont); |
michael@0 | 19 | |
michael@0 | 20 | /** |
michael@0 | 21 | * Print options interface |
michael@0 | 22 | * |
michael@0 | 23 | * Do not attempt to freeze this API - it still needs lots of work. Consult |
michael@0 | 24 | * John Keiser <jkeiser@netscape.com> and Roland Mainz |
michael@0 | 25 | * <roland.mainz@informatik.med.uni-giessen.de> for futher details. |
michael@0 | 26 | */ |
michael@0 | 27 | [scriptable, uuid(92597c2b-109b-40bb-8f93-9b9acfa31de8)] |
michael@0 | 28 | |
michael@0 | 29 | interface nsIPrintOptions : nsISupports |
michael@0 | 30 | { |
michael@0 | 31 | /** |
michael@0 | 32 | * Show Native Print Options dialog, this may not be supported on all platforms |
michael@0 | 33 | */ |
michael@0 | 34 | void ShowPrintSetupDialog(in nsIPrintSettings aThePrintSettings); |
michael@0 | 35 | |
michael@0 | 36 | /** |
michael@0 | 37 | * Creates a new PrintSettnigs Object |
michael@0 | 38 | * and initializes it from prefs |
michael@0 | 39 | */ |
michael@0 | 40 | nsIPrintSettings CreatePrintSettings(); |
michael@0 | 41 | |
michael@0 | 42 | /** |
michael@0 | 43 | * Get a prefixed integer pref |
michael@0 | 44 | */ |
michael@0 | 45 | int32_t getPrinterPrefInt(in nsIPrintSettings aPrintSettings, in wstring |
michael@0 | 46 | aPrefName); |
michael@0 | 47 | |
michael@0 | 48 | /** |
michael@0 | 49 | * display Printer Job Properties dialog |
michael@0 | 50 | */ |
michael@0 | 51 | void displayJobProperties (in wstring aPrinter, in nsIPrintSettings |
michael@0 | 52 | aPrintSettings, out boolean aDisplayed); |
michael@0 | 53 | |
michael@0 | 54 | /** |
michael@0 | 55 | * Native data constants |
michael@0 | 56 | */ |
michael@0 | 57 | const short kNativeDataPrintRecord = 0; |
michael@0 | 58 | |
michael@0 | 59 | [noscript] voidPtr GetNativeData(in short aDataType); |
michael@0 | 60 | }; |
michael@0 | 61 | |
michael@0 | 62 | [scriptable, uuid(5e738fff-404c-4c94-9189-e8f2cce93e94)] |
michael@0 | 63 | |
michael@0 | 64 | interface nsIPrinterEnumerator : nsISupports |
michael@0 | 65 | { |
michael@0 | 66 | /** |
michael@0 | 67 | * The name of the system default printer. This name should also be |
michael@0 | 68 | * present in printerNameList below. This is not necessarily gecko's |
michael@0 | 69 | * default printer; see nsIPrintSettingsService.defaultPrinterName |
michael@0 | 70 | * for that. |
michael@0 | 71 | */ |
michael@0 | 72 | readonly attribute wstring defaultPrinterName; |
michael@0 | 73 | |
michael@0 | 74 | /** |
michael@0 | 75 | * Initializes certain settings from the native printer into the PrintSettings |
michael@0 | 76 | * These settings include, but are not limited to: |
michael@0 | 77 | * Page Orientation |
michael@0 | 78 | * Page Size |
michael@0 | 79 | * Number of Copies |
michael@0 | 80 | */ |
michael@0 | 81 | void initPrintSettingsFromPrinter(in wstring aPrinterName, in nsIPrintSettings aPrintSettings); |
michael@0 | 82 | |
michael@0 | 83 | /** |
michael@0 | 84 | * The list of printer names |
michael@0 | 85 | */ |
michael@0 | 86 | readonly attribute nsIStringEnumerator printerNameList; |
michael@0 | 87 | |
michael@0 | 88 | /* takes printer selected and will display job properties dlg for that printer |
michael@0 | 89 | * returns true if dialog displays |
michael@0 | 90 | */ |
michael@0 | 91 | void displayPropertiesDlg(in wstring aPrinter, in nsIPrintSettings aPrintSettings); |
michael@0 | 92 | |
michael@0 | 93 | }; |
michael@0 | 94 |