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