Tizen 2.1 base
[platform/upstream/hplip.git] / prnt / hpijs / ljmono.h
1 /*****************************************************************************\
2   ljmono.h : Interface for the LJMono class
3
4   Copyright (c) 1996 - 2001, Hewlett-Packard Co.
5   All rights reserved.
6
7   Redistribution and use in source and binary forms, with or without
8   modification, are permitted provided that the following conditions
9   are met:
10   1. Redistributions of source code must retain the above copyright
11      notice, this list of conditions and the following disclaimer.
12   2. Redistributions in binary form must reproduce the above copyright
13      notice, this list of conditions and the following disclaimer in the
14      documentation and/or other materials provided with the distribution.
15   3. Neither the name of Hewlett-Packard nor the names of its
16      contributors may be used to endorse or promote products derived
17      from this software without specific prior written permission.
18
19   THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
20   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
21   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
22   NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
24   TO, PATENT INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
25   OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
26   ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28   THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 \*****************************************************************************/
30
31
32 #ifndef APDK_LJMONO_H
33 #define APDK_LJMONO_H
34
35 APDK_BEGIN_NAMESPACE
36
37 #ifdef  APDK_HIGH_RES_MODES
38 #define LJ_BASE_RES 300
39 #else
40 #define LJ_BASE_RES 150
41 #endif
42
43 /*!
44 \internal
45 */
46 class LJMono : public Printer
47 {
48 public:
49     LJMono (SystemServices* pSS,int numfonts=0, BOOL proto=FALSE);
50     ~LJMono ();
51
52     virtual Header* SelectHeader (PrintContext* pc);
53     virtual DRIVER_ERROR VerifyPenInfo ();
54     virtual DRIVER_ERROR ParsePenInfo (PEN_TYPE& ePen, BOOL QueryPrinter=TRUE);
55     virtual DISPLAY_STATUS ParseError (BYTE status_reg);
56         virtual DRIVER_ERROR Flush (int FlushSize)
57         {
58                 return NO_ERROR;
59         }
60
61     virtual BOOL GetMargins (PAPER_SIZE ps, float *fMargins)
62     {
63         fMargins[0] = (float) 0.25;
64         fMargins[1] = (float) 0.25;
65         fMargins[2] = (float) 0.2;
66         fMargins[3] = (float) 0.2;
67         return TRUE;
68     }
69
70 #ifdef APDK_AUTODUPLEX
71
72 /*
73  *  Note that we are returning TRUE here not to say there is a Hagaki Feed tray
74  *  and Hagaki Card duplexer. Some non-HP Lasers number their input trays
75  *  differently and try 5 (sourceHagakiFeedNDuplexer) can be a valid input tray.
76  *  In order to allow selection of this tray, we will return TRUE for all lasers.
77  */
78
79     virtual BOOL HagakiFeedDuplexerPresent (BOOL bQueryPrinter)
80     {
81         return TRUE;
82     }
83 #endif
84
85     Compressor* CreateCompressor (unsigned int RasterSize);
86
87 protected:
88
89 #ifdef APDK_HP_UX
90     virtual LJMono & operator = (Printer& rhs)
91     {
92         return *this;
93     }
94 #endif
95
96     BOOL    m_bJobStarted;
97
98 }; // LJMono
99
100 class LJMonoDraftMode : public GrayMode
101 {
102 public:
103         LJMonoDraftMode ();
104 };      // LJMonoDraftMode
105
106 class LJMonoNormalMode : public GrayMode
107 {
108 public:
109     LJMonoNormalMode ();
110 }; // LJMonoNormalMode
111
112 class LJMonoBestMode : public GrayMode
113 {
114 public:
115     LJMonoBestMode ();
116 }; // LJMonoBestMode
117
118 #ifdef APDK_LJMONO
119 //! LJMonoProxy
120 /*!
121 ******************************************************************************/
122 class LJMonoProxy : public PrinterProxy
123 {
124 public:
125     LJMonoProxy() : PrinterProxy(
126         "Mono Laser",               // family name
127         "HP LaserJet\0"
128                 "hp LaserJet\0"
129 #ifdef APDK_MLC_PRINTER
130 #endif
131     ) {m_iPrinterType = eLJMono;}
132     inline Printer* CreatePrinter(SystemServices* pSS) const { return new LJMono(pSS); }
133         inline PRINTER_TYPE GetPrinterType() const { return eLJMono;}
134         inline unsigned int GetModelBit() const { return 0x40;}
135 };
136 #endif
137
138 APDK_END_NAMESPACE
139
140 #endif //APDK_LJMono_H