2006-02-07 01:13:47 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 11:12:37 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2006-02-07 01:13:47 +00:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
%{ C++
|
|
|
|
#include "windows.h"
|
|
|
|
%}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Native types
|
|
|
|
*/
|
2008-10-22 00:54:26 +00:00
|
|
|
[ptr] native nsDevMode(DEVMODEW);
|
2016-01-22 16:05:19 +00:00
|
|
|
native nsHdc(HDC);
|
2006-02-07 01:13:47 +00:00
|
|
|
|
|
|
|
/**
|
2019-04-21 01:47:00 +00:00
|
|
|
* Simplified PrintSettings for Windows interface
|
2006-02-07 01:13:47 +00:00
|
|
|
*/
|
2019-05-14 08:19:10 +00:00
|
|
|
[uuid(c63eed41-6ac5-459e-8a64-033eb9ad770a)]
|
2006-02-07 01:13:47 +00:00
|
|
|
interface nsIPrintSettingsWin : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Data Members
|
|
|
|
*
|
2019-04-21 01:47:00 +00:00
|
|
|
* Each of these data members make a copy
|
|
|
|
* of the contents. If you get the value,
|
2006-02-07 01:13:47 +00:00
|
|
|
* you own the memory.
|
|
|
|
*
|
|
|
|
* The following three pieces of data are needed
|
2019-04-21 01:47:00 +00:00
|
|
|
* to create a DC for printing. These are typcially
|
2006-02-07 01:13:47 +00:00
|
|
|
* gotten via the PrintDLG call ro can be obtained
|
|
|
|
* via the "m_pd" data member of the CPrintDialog
|
|
|
|
* in MFC.
|
|
|
|
*/
|
2017-10-08 23:08:09 +00:00
|
|
|
[noscript] attribute AString deviceName;
|
|
|
|
[noscript] attribute AString driverName;
|
2006-02-07 01:13:47 +00:00
|
|
|
|
|
|
|
[noscript] attribute nsDevMode devMode;
|
|
|
|
|
2016-01-22 16:05:19 +00:00
|
|
|
/**
|
|
|
|
* Copy relevant print settings from native Windows device.
|
|
|
|
*
|
|
|
|
* @param hdc HDC to copy from
|
2016-01-12 17:40:07 +00:00
|
|
|
* @param devMode DEVMODE to copy from
|
2016-01-22 16:05:19 +00:00
|
|
|
*/
|
2016-01-12 17:40:07 +00:00
|
|
|
[notxpcom] void copyFromNative(in nsHdc hdc, in nsDevMode devMode);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Copy relevant print settings to native windows structures.
|
|
|
|
*
|
|
|
|
* @param devMode DEVMODE to be populated.
|
|
|
|
*/
|
|
|
|
[notxpcom] void copyToNative(in nsDevMode devMode);
|
2006-02-07 01:13:47 +00:00
|
|
|
};
|