Back to index

lightning-sunbird  0.9+nobinonly
nsIDeviceContextSpecPS.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *   Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
00024  *
00025  * Alternatively, the contents of this file may be used under the terms of
00026  * either of the GNU General Public License Version 2 or later (the "GPL"),
00027  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00028  * in which case the provisions of the GPL or the LGPL are applicable instead
00029  * of those above. If you wish to allow use of your version of this file only
00030  * under the terms of either the GPL or the LGPL, and not to allow others to
00031  * use your version of this file under the terms of the MPL, indicate your
00032  * decision by deleting the provisions above and replace them with the notice
00033  * and other provisions required by the GPL or the LGPL. If you do not delete
00034  * the provisions above, a recipient may use your version of this file under
00035  * the terms of any one of the MPL, the GPL or the LGPL.
00036  *
00037  * ***** END LICENSE BLOCK ***** */
00038 
00039 #ifndef nsIDeviceContextSpecPS_h___
00040 #define nsIDeviceContextSpecPS_h___
00041 
00042 #include "nsISupports.h"
00043 
00044 /* dummy printer name for the gfx/src/ps driver */
00045 #define NS_POSTSCRIPT_DRIVER_NAME "PostScript/"
00046 /* strlen(NS_POSTSCRIPT_DRIVER_NAME)*/
00047 #define NS_POSTSCRIPT_DRIVER_NAME_LEN (11) 
00048 
00049 #define NS_IDEVICE_CONTEXT_SPEC_PS_IID { 0xa4ef8910, 0xdd65, 0x11d2, { 0xa8, 0x32, 0x0, 0x10, 0x5a, 0x18, 0x34, 0x19 } }
00050 
00051 class nsIDeviceContextSpecPS : public nsISupports
00052 {
00053 
00054 public:
00055    NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDEVICE_CONTEXT_SPEC_PS_IID)
00056 
00057   /*
00058    * If PR_TRUE, print to printer  
00059    * @update 
00060    * @param aToPrinter --  
00061    * @return 
00062    **/
00063    NS_IMETHOD GetToPrinter( PRBool &aToPrinter ) = 0; 
00064 
00065   /*
00066    * If PR_TRUE, print to printer  
00067    * @update 
00068    * @param aIsPPreview -- Set to PR_TRUE for print preview, PR_FALSE otherwise.
00069    * @return 
00070    **/
00071    NS_IMETHOD GetIsPrintPreview( PRBool &aIsPPreview ) = 0; 
00072 
00073   /*
00074    * If PR_TRUE, first page first 
00075    * @update 
00076    * @param aFpf -- 
00077    * @return 
00078    **/
00079    NS_IMETHOD GetFirstPageFirst (  PRBool &aFpf ) = 0;     
00080 
00081   /*
00082    * If PR_TRUE, print grayscale 
00083    * @update 
00084    * @param aGrayscale --
00085    * @return 
00086    **/
00087    NS_IMETHOD GetGrayscale(  PRBool &aGrayscale ) = 0;   
00088 
00089   /*
00090    * Top margin 
00091    * @update 
00092    * @param aValue --
00093    * @return 
00094    **/
00095    NS_IMETHOD GetTopMargin (  float &aValue ) = 0; 
00096 
00097   /*
00098    * Bottom margin 
00099    * @update 
00100    * @param aValue --
00101    * @return 
00102    **/
00103    NS_IMETHOD GetBottomMargin (  float &aValue ) = 0; 
00104 
00105   /*
00106    * Left margin 
00107    * @update 
00108    * @param aValue --
00109    * @return 
00110    **/
00111    NS_IMETHOD GetLeftMargin (  float &aValue ) = 0; 
00112 
00113   /*
00114    * Right margin 
00115    * @update 
00116    * @param aValue --
00117    * @return 
00118    **/
00119    NS_IMETHOD GetRightMargin (  float &aValue ) = 0; 
00120 
00121   /*
00122    * Print command e.g., lpr 
00123    * @update 
00124    * @param aCommand --
00125    * @return 
00126    **/
00127    NS_IMETHOD GetCommand ( const char **aCommand ) = 0;   
00128 
00129   /*
00130    * Printer name e.g., myprinter
00131    * @update 
00132    * @param aPrinter --
00133    * @return 
00134    **/
00135    NS_IMETHOD GetPrinterName ( const char **aPrinter ) = 0;   
00136 
00137   /*
00138    * If PR_TRUE, user chose Landscape
00139    * @update 
00140    * @param aLandscape
00141    * @return 
00142    **/
00143    NS_IMETHOD GetLandscape ( PRBool &aLandscape ) = 0;   
00144 
00145   /*
00146    * If toPrinter = PR_FALSE, dest file 
00147    * @update 
00148    * @param aPath --
00149    * @return 
00150    **/
00151    NS_IMETHOD GetPath ( const char **aPath ) = 0;    
00152 
00153   /*
00154    * If PR_TRUE, user cancelled 
00155    * @update 
00156    * @param aCancel -- 
00157    * @return 
00158    **/
00159    NS_IMETHOD GetUserCancelled(  PRBool &aCancel ) = 0;      
00160 
00161   /*
00162    * Paper name e.g., "din-a4" or "manual/din-a4"
00163    * @update 
00164    * @param aPaperName --
00165    * @return 
00166    **/
00167    NS_IMETHOD GetPaperName ( const char **aPaperName ) = 0;
00168 
00169    /*
00170     * Returns W/H in Twips from Paper Size H/W
00171     */
00172    NS_IMETHOD GetPageSizeInTwips(PRInt32 *aWidth, PRInt32 *aHeight) = 0;
00173  
00174    /*
00175     * Return number of copies to print
00176     * @update
00177     * @param aCopies
00178     * @return
00179     */
00180    NS_IMETHOD GetCopies ( int &aCopies ) = 0;
00181 
00182 };
00183 
00184 #endif /* !nsIDeviceContextSpecPS_h___ */
00185