Bug 1643246 - Don't use attribute selectors for determining if a select is a drop...
[gecko.git] / widget / nsIPrintSettingsWin.idl
blob1a61a7f8ce2f1a9cd55f2fb135a1c39f24f38878
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"
8 %{ C++
9 #include "windows.h"
12 /**
13 * Native types
15 [ptr] native nsDevMode(DEVMODEW);
16 native nsHdc(HDC);
18 /**
19 * Simplified PrintSettings for Windows interface
21 [uuid(c63eed41-6ac5-459e-8a64-033eb9ad770a)]
22 interface nsIPrintSettingsWin : nsISupports
24 /**
25 * Data Members
27 * Each of these data members make a copy
28 * of the contents. If you get the value,
29 * you own the memory.
31 * The following three pieces of data are needed
32 * to create a DC for printing. These are typcially
33 * gotten via the PrintDLG call ro can be obtained
34 * via the "m_pd" data member of the CPrintDialog
35 * in MFC.
37 [noscript] attribute AString deviceName;
38 [noscript] attribute AString driverName;
40 [noscript] attribute nsDevMode devMode;
42 /**
43 * On Windows we use the printable width and height for the printing surface.
44 * We don't want to have to create native print device contexts in the content
45 * process, so we need to store these in the settings.
46 * Storing in Inches is most convenient as they are retrieved from the device
47 * using fields which are in pixels and pixels per inch.
48 * Note these are stored in portrait format to ensure that we can take account
49 * of our own changes to the orientation print setting.
51 [noscript] attribute double printableWidthInInches;
52 [noscript] attribute double printableHeightInInches;
54 /**
55 * Copy relevant print settings from native Windows device.
57 * @param hdc HDC to copy from
58 * @param devMode DEVMODE to copy from
60 [notxpcom] void copyFromNative(in nsHdc hdc, in nsDevMode devMode);
62 /**
63 * Copy relevant print settings to native windows structures.
65 * @param devMode DEVMODE to be populated.
67 [notxpcom] void copyToNative(in nsDevMode devMode);