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
|
2001-02-02 02:04:07 +03: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/
|
2001-02-02 02:04:07 +03: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.
|
2001-02-02 02:04:07 +03: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.
|
2001-02-02 02:04:07 +03:00
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
* Don Cone <dcone@netscape.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 ***** */
|
2001-02-02 02:04:07 +03:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Simplified graphics interface for JS rendering.
|
2001-03-24 03:22:18 +03:00
|
|
|
*
|
|
|
|
* @status UNDER_REVIEW
|
2001-02-02 02:04:07 +03:00
|
|
|
*/
|
|
|
|
[scriptable, uuid(83427530-F790-11d4-A869-00105A183419)]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
interface nsIPrintSettings : nsISupports
|
|
|
|
{
|
|
|
|
/* Print Option Flags for Bit Field*/
|
2001-11-03 17:45:46 +03:00
|
|
|
const long kOptPrintOddPages = 0x00000001;
|
|
|
|
const long kOptPrintEvenPages = 0x00000002;
|
|
|
|
const long kPrintOptionsEnableSelectionRB = 0x00000004;
|
2001-02-02 02:04:07 +03:00
|
|
|
|
|
|
|
/* Print Range Enums */
|
|
|
|
const long kRangeAllPages = 0;
|
|
|
|
const long kRangeSpecifiedPageRange = 1;
|
|
|
|
const long kRangeSelection = 2;
|
|
|
|
const long kRangeFocusFrame = 3;
|
|
|
|
|
|
|
|
/* Justification Enums */
|
|
|
|
const long kJustLeft = 0;
|
|
|
|
const long kJustCenter = 1;
|
|
|
|
const long kJustRight = 2;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Page Size Constants
|
|
|
|
*/
|
|
|
|
const short kLetterPaperSize = 0;
|
|
|
|
const short kLegalPaperSize = 1;
|
|
|
|
const short kExecutivePaperSize = 2;
|
|
|
|
const short kA4PaperSize = 3;
|
2001-04-19 02:11:55 +04:00
|
|
|
const short kA3PaperSize = 4;
|
2001-02-02 02:04:07 +03:00
|
|
|
|
2001-11-03 16:00:40 +03:00
|
|
|
/**
|
2001-11-03 17:45:46 +03:00
|
|
|
* Orientation Constants
|
2001-11-03 16:00:40 +03:00
|
|
|
*/
|
2001-11-03 17:45:46 +03:00
|
|
|
const short kPortraitOrientation = 0;
|
|
|
|
const short kLandscapeOrientation = 1;
|
2001-11-03 17:17:37 +03:00
|
|
|
|
2001-11-03 17:45:46 +03:00
|
|
|
/**
|
|
|
|
* Print Frame Constants
|
|
|
|
*/
|
|
|
|
const short kNoFrames = 0;
|
|
|
|
const short kFramesAsIs = 1;
|
|
|
|
const short kSelectedFrame = 2;
|
|
|
|
const short kEachFrameSep = 3;
|
2001-02-02 02:04:07 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set PrintOptions
|
|
|
|
*/
|
|
|
|
void SetPrintOptions(in PRInt32 aType, in PRBool aTurnOnOff);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get PrintOptions
|
|
|
|
*/
|
|
|
|
PRBool GetPrintOptions(in PRInt32 aType);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set PrintOptions Bit field
|
|
|
|
*/
|
|
|
|
PRInt32 GetPrintOptionsBits();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Data Members
|
|
|
|
*/
|
|
|
|
attribute long startPageRange;
|
|
|
|
attribute long endPageRange;
|
|
|
|
|
|
|
|
attribute double marginTop; /* these are in inches */
|
|
|
|
attribute double marginLeft;
|
|
|
|
attribute double marginBottom;
|
|
|
|
attribute double marginRight;
|
|
|
|
|
2001-11-03 17:45:46 +03:00
|
|
|
attribute short printRange;
|
|
|
|
|
2001-02-02 02:04:07 +03:00
|
|
|
attribute wstring title;
|
|
|
|
attribute wstring docURL;
|
|
|
|
|
2001-11-03 17:45:46 +03:00
|
|
|
attribute wstring headerStrLeft;
|
|
|
|
attribute wstring headerStrCenter;
|
|
|
|
attribute wstring headerStrRight;
|
2001-02-02 02:04:07 +03:00
|
|
|
|
2001-11-03 17:45:46 +03:00
|
|
|
attribute wstring footerStrLeft;
|
|
|
|
attribute wstring footerStrCenter;
|
|
|
|
attribute wstring footerStrRight;
|
2001-02-02 02:04:07 +03:00
|
|
|
|
2001-11-03 17:45:46 +03:00
|
|
|
attribute short printFrameType;
|
|
|
|
attribute boolean PrintSilent; /* print without putting up the dialog */
|
2001-11-03 17:17:37 +03:00
|
|
|
|
2001-11-03 17:45:46 +03:00
|
|
|
/* Additional XP Related */
|
|
|
|
attribute boolean printReversed;
|
|
|
|
attribute boolean printInColor; /* a false means grayscale */
|
|
|
|
attribute long paperSize; /* see page size consts */
|
|
|
|
attribute long orientation; /* see orientation consts */
|
|
|
|
attribute wstring printCommand;
|
|
|
|
attribute boolean printToFile;
|
|
|
|
attribute wstring toFileName;
|
2001-02-02 02:04:07 +03:00
|
|
|
|
2001-11-03 17:45:46 +03:00
|
|
|
attribute long printPageDelay; /* in milliseconds */
|
2001-02-02 02:04:07 +03:00
|
|
|
|
|
|
|
};
|