2001-09-26 04:16:04 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
2000-06-22 02:21:34 +04:00
|
|
|
*
|
2001-09-26 04:16:04 +04:00
|
|
|
* The contents of this file are subject to the Netscape Public License
|
|
|
|
* Version 1.1 (the "License"); you may not use this file except in
|
|
|
|
* compliance with the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/NPL/
|
2000-06-22 02:21:34 +04:00
|
|
|
*
|
2001-09-26 04:16:04 +04:00
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
2000-06-22 02:21:34 +04:00
|
|
|
*
|
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
2001-09-26 04:16:04 +04:00
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 2000
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
2000-06-22 02:21:34 +04:00
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
* Don Cone <dcone@netscape.com>
|
2001-11-22 13:00:44 +03:00
|
|
|
* Jessica Blanco <jblanco@us.ibm.com>
|
2001-09-26 04:16:04 +04:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the NPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the NPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
2000-06-22 02:21:34 +04:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
2001-11-03 17:45:46 +03:00
|
|
|
#include "nsIPrintSettings.idl"
|
2000-06-22 02:21:34 +04:00
|
|
|
|
2001-01-27 17:09:34 +03:00
|
|
|
%{ C++
|
|
|
|
#include "nsFont.h"
|
|
|
|
%}
|
2000-06-22 02:21:34 +04:00
|
|
|
|
2001-11-22 13:00:44 +03:00
|
|
|
interface nsISimpleEnumerator;
|
|
|
|
|
2001-02-02 11:42:53 +03:00
|
|
|
/**
|
|
|
|
* Native types
|
|
|
|
*/
|
|
|
|
[ref] native nsNativeFontRef(nsFont);
|
|
|
|
[ref] native nsNativeStringRef(nsString);
|
|
|
|
|
2000-06-22 02:21:34 +04:00
|
|
|
/**
|
|
|
|
* Simplified graphics interface for JS rendering.
|
2001-03-24 03:22:18 +03:00
|
|
|
*
|
|
|
|
* @status UNDER_REVIEW
|
2000-06-22 02:21:34 +04:00
|
|
|
*/
|
|
|
|
[scriptable, uuid(CAE87E20-479E-11d4-A856-00105A183419)]
|
|
|
|
|
|
|
|
interface nsIPrintOptions : nsISupports
|
|
|
|
{
|
2001-01-27 17:09:34 +03:00
|
|
|
/**
|
|
|
|
* Show Native Print Options dialog, this may not be supported on all platforms
|
|
|
|
*/
|
2002-02-07 08:32:59 +03:00
|
|
|
void ShowPrintSetupDialog(in nsIPrintSettings aThePrintSettings);
|
2000-06-22 02:21:34 +04:00
|
|
|
|
2002-01-01 15:58:53 +03:00
|
|
|
/**
|
|
|
|
* Creates a new PrintSettnigs Object
|
|
|
|
* and initializes it from prefs
|
|
|
|
*/
|
|
|
|
nsIPrintSettings CreatePrintSettings();
|
|
|
|
|
2002-03-16 16:08:45 +03:00
|
|
|
/**
|
|
|
|
* available Printers
|
|
|
|
*/
|
|
|
|
nsISimpleEnumerator availablePrinters ();
|
2001-01-27 17:09:34 +03:00
|
|
|
|
2002-05-21 14:53:45 +04:00
|
|
|
/**
|
|
|
|
* Get a prefixed integer pref
|
|
|
|
*/
|
|
|
|
PRInt32 getPrinterPrefInt(in nsIPrintSettings aPrintSettings, in wstring aPrefName);
|
|
|
|
|
2002-03-16 16:08:45 +03:00
|
|
|
/**
|
|
|
|
* display Printer Job Properties dialog
|
|
|
|
*/
|
|
|
|
void displayJobProperties (in wstring aPrinter, in nsIPrintSettings aPrintSettings, out boolean aDisplayed);
|
2001-11-26 15:48:41 +03:00
|
|
|
|
2002-03-16 16:08:45 +03:00
|
|
|
// no script methods
|
2001-02-02 11:42:53 +03:00
|
|
|
[noscript] void SetFontNamePointSize(in nsNativeStringRef aName, in PRInt32 aPointSize);
|
|
|
|
|
2002-03-16 16:08:45 +03:00
|
|
|
[noscript] void SetDefaultFont(in nsNativeFontRef aFont);
|
2001-02-02 11:42:53 +03:00
|
|
|
/* Purposely made this an "in" arg */
|
2002-03-16 16:08:45 +03:00
|
|
|
[noscript] void GetDefaultFont(in nsNativeFontRef aFont);
|
2001-01-27 17:09:34 +03:00
|
|
|
|
2001-10-13 03:48:34 +04:00
|
|
|
/**
|
|
|
|
* Native data constants
|
|
|
|
*/
|
|
|
|
const short kNativeDataPrintRecord = 0;
|
|
|
|
|
|
|
|
[noscript] voidPtr GetNativeData(in short aDataType);
|
2001-11-22 13:00:44 +03:00
|
|
|
};
|
2001-10-13 03:48:34 +04:00
|
|
|
|
2001-11-22 13:00:44 +03:00
|
|
|
[scriptable, uuid(a6cf9128-15b3-11d2-932e-00805f8add32)]
|
|
|
|
interface nsIPrinterEnumerator : nsISupports
|
|
|
|
{
|
2002-02-13 16:58:41 +03:00
|
|
|
/**
|
|
|
|
* The name of the default printer
|
|
|
|
* This name must be in the list of printer names returned by
|
|
|
|
* "availablePrinters"
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
readonly attribute wstring defaultPrinterName;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initializes certain settings from the native printer into the PrintSettings
|
|
|
|
* These settings include, but are not limited to:
|
|
|
|
* Page Orientation
|
|
|
|
* Page Size
|
|
|
|
* Number of Copies
|
|
|
|
*/
|
|
|
|
void initPrintSettingsFromPrinter(in wstring aPrinterName, in nsIPrintSettings aPrintSettings);
|
|
|
|
|
2001-11-22 13:00:44 +03:00
|
|
|
/**
|
2002-01-01 15:58:53 +03:00
|
|
|
* Returns an array of the names of all installed printers.
|
2001-11-22 13:00:44 +03:00
|
|
|
*
|
|
|
|
* @param aCount returns number of printers returned
|
|
|
|
* @param aResult returns array of names
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
void enumeratePrinters(out PRUint32 aCount,[retval, array, size_is(aCount)] out wstring aResult);
|
|
|
|
|
|
|
|
/* takes printer selected and will display job properties dlg for that printer
|
|
|
|
* returns true if dialog displays
|
|
|
|
*/
|
2002-01-01 15:58:53 +03:00
|
|
|
void displayPropertiesDlg(in wstring aPrinter, in nsIPrintSettings aPrintSettings);
|
|
|
|
|
2000-06-22 02:21:34 +04:00
|
|
|
};
|
2001-11-22 13:00:44 +03:00
|
|
|
|