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"
15 [ptr] native nsDevMode
(DEVMODEW
);
19 * Simplified PrintSettings for Windows interface
21 [scriptable
, uuid(c63eed41
-6ac5
-459e-8a64
-033eb9ad770a
)]
23 interface nsIPrintSettingsWin
: nsISupports
28 * Each of these data members make a copy
29 * of the contents. If you get the value,
32 * The following three pieces of data are needed
33 * to create a DC for printing. These are typcially
34 * gotten via the PrintDLG call ro can be obtained
35 * via the "m_pd" data member of the CPrintDialog
38 [noscript
] attribute AString deviceName
;
39 [noscript
] attribute AString driverName
;
41 [noscript
] attribute nsDevMode devMode
;
44 * On Windows we use the printable width and height for the printing surface.
45 * We don't want to have to create native print device contexts in the content
46 * process, so we need to store these in the settings.
47 * Storing in Inches is most convenient as they are retrieved from the device
48 * using fields which are in pixels and pixels per inch.
49 * Note these are stored in portrait format to ensure that we can take account
50 * of our own changes to the orientation print setting.
52 [noscript
] attribute
double printableWidthInInches
;
53 [noscript
] attribute
double printableHeightInInches
;
56 * Copy relevant print settings from native Windows device.
58 * @param hdc HDC to copy from
59 * @param devMode DEVMODE to copy from
61 [notxpcom
] void copyFromNative
(in nsHdc hdc
, in nsDevMode devMode
);
64 * Copy relevant print settings to native windows structures.
66 * @param devMode DEVMODE to be populated.
68 [notxpcom
] void copyToNative
(in nsDevMode devMode
);