Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / widget / windows / nsPrintSettingsWin.h
blobc127efbeb6da0799d6b4fc7491d4a6a4c7566122
1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsPrintSettingsWin_h__
8 #define nsPrintSettingsWin_h__
10 #include "nsPrintSettingsImpl.h"
11 #include "nsIPrintSettingsWin.h"
12 #include <windows.h>
14 //*****************************************************************************
15 //*** nsPrintSettingsWin
16 //*****************************************************************************
17 class nsPrintSettingsWin : public nsPrintSettings, public nsIPrintSettingsWin {
18 virtual ~nsPrintSettingsWin();
20 public:
21 NS_DECL_ISUPPORTS_INHERITED
22 NS_DECL_NSIPRINTSETTINGSWIN
24 nsPrintSettingsWin();
25 nsPrintSettingsWin(const nsPrintSettingsWin& aPS);
27 /**
28 * @param aPaperSize the Windows dmPaperSize
29 * @param aPaperSizeUnit will be set to the nsIPrintSettings paper size unit
30 * associated with aPaperSize or left unchanged if
31 * aPaperSize is not recognized
33 static void PaperSizeUnitFromDmPaperSize(short aPaperSize,
34 int16_t& aPaperSizeUnit);
36 void InitWithInitializer(const PrintSettingsInitializer& aSettings) final;
38 /**
39 * Makes a new copy
41 virtual nsresult _Clone(nsIPrintSettings** _retval);
43 /**
44 * Assigns values
46 virtual nsresult _Assign(nsIPrintSettings* aPS);
48 /**
49 * Assignment
51 nsPrintSettingsWin& operator=(const nsPrintSettingsWin& rhs);
53 protected:
54 void CopyDevMode(DEVMODEW* aInDevMode, DEVMODEW*& aOutDevMode);
55 void InitUnwriteableMargin(HDC aHdc);
57 nsString mDeviceName;
58 nsString mDriverName;
59 LPDEVMODEW mDevMode;
62 #endif /* nsPrintSettingsWin_h__ */