|
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/. */ |
|
5 |
|
6 #include "nsISupports.idl" |
|
7 #include "nsIPrintSettings.idl" |
|
8 |
|
9 %{ C++ |
|
10 struct nsFont; |
|
11 %} |
|
12 |
|
13 interface nsIStringEnumerator; |
|
14 |
|
15 /** |
|
16 * Native types |
|
17 */ |
|
18 [ref] native nsNativeFontRef(nsFont); |
|
19 |
|
20 /** |
|
21 * Print options interface |
|
22 * |
|
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. |
|
26 */ |
|
27 [scriptable, uuid(92597c2b-109b-40bb-8f93-9b9acfa31de8)] |
|
28 |
|
29 interface nsIPrintOptions : nsISupports |
|
30 { |
|
31 /** |
|
32 * Show Native Print Options dialog, this may not be supported on all platforms |
|
33 */ |
|
34 void ShowPrintSetupDialog(in nsIPrintSettings aThePrintSettings); |
|
35 |
|
36 /** |
|
37 * Creates a new PrintSettnigs Object |
|
38 * and initializes it from prefs |
|
39 */ |
|
40 nsIPrintSettings CreatePrintSettings(); |
|
41 |
|
42 /** |
|
43 * Get a prefixed integer pref |
|
44 */ |
|
45 int32_t getPrinterPrefInt(in nsIPrintSettings aPrintSettings, in wstring |
|
46 aPrefName); |
|
47 |
|
48 /** |
|
49 * display Printer Job Properties dialog |
|
50 */ |
|
51 void displayJobProperties (in wstring aPrinter, in nsIPrintSettings |
|
52 aPrintSettings, out boolean aDisplayed); |
|
53 |
|
54 /** |
|
55 * Native data constants |
|
56 */ |
|
57 const short kNativeDataPrintRecord = 0; |
|
58 |
|
59 [noscript] voidPtr GetNativeData(in short aDataType); |
|
60 }; |
|
61 |
|
62 [scriptable, uuid(5e738fff-404c-4c94-9189-e8f2cce93e94)] |
|
63 |
|
64 interface nsIPrinterEnumerator : nsISupports |
|
65 { |
|
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. |
|
71 */ |
|
72 readonly attribute wstring defaultPrinterName; |
|
73 |
|
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 |
|
80 */ |
|
81 void initPrintSettingsFromPrinter(in wstring aPrinterName, in nsIPrintSettings aPrintSettings); |
|
82 |
|
83 /** |
|
84 * The list of printer names |
|
85 */ |
|
86 readonly attribute nsIStringEnumerator printerNameList; |
|
87 |
|
88 /* takes printer selected and will display job properties dlg for that printer |
|
89 * returns true if dialog displays |
|
90 */ |
|
91 void displayPropertiesDlg(in wstring aPrinter, in nsIPrintSettings aPrintSettings); |
|
92 |
|
93 }; |
|
94 |