Code sync
[external/hplip.git] / prnt / hpijs / dj9xx.h
1 /*****************************************************************************\
2   dj9xx.h : Interface for the DJ9xx 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_DJ9XX_H
33 #define APDK_DJ9XX_H
34
35 APDK_BEGIN_NAMESPACE
36
37 //extern char *ModelString[MAX_ID_STRING];
38
39 /*!
40 \internal
41 */
42 class DJ9xx : public Printer
43 {
44 public:
45     DJ9xx(SystemServices* pSS, BOOL proto=FALSE);
46
47     virtual ~DJ9xx();
48
49     BOOL UseGUIMode(PrintMode* pPrintMode);
50     Header* SelectHeader(PrintContext* pc);
51     Compressor* CreateCompressor(unsigned int RasterSize);
52     DISPLAY_STATUS ParseError(BYTE status_reg);
53     DRIVER_ERROR VerifyPenInfo();
54
55 #if defined(APDK_FONTS_NEEDED)
56     Font* RealizeFont(const int index,const BYTE bSize,
57                         const TEXTCOLOR eColor=BLACK_TEXT,
58                         const BOOL bBold=FALSE,const BOOL bItalic=FALSE,
59                         const BOOL bUnderline=FALSE);
60 #endif
61
62     virtual DRIVER_ERROR ParsePenInfo(PEN_TYPE& ePen, BOOL QueryPrinter=TRUE);
63
64     PAPER_SIZE MandatoryPaperSize();
65
66     DRIVER_ERROR CleanPen();
67
68     virtual BOOL PhotoTrayPresent(BOOL bQueryPrinter);
69
70     virtual PHOTOTRAY_STATE PhotoTrayEngaged (BOOL bQueryPrinter);
71     inline virtual BOOL SupportSeparateBlack (PrintMode *pCurrentMode)
72     {
73         if (pCurrentMode->medium != mediaPlain)
74         {
75             return FALSE;
76         }
77         return TRUE;
78     }
79
80 protected:
81
82 #ifdef APDK_HP_UX
83     virtual DJ9xx & operator = (Printer& rhs)
84     {
85         return *this;
86     }
87 #endif
88
89     virtual BYTE PhotoTrayStatus(BOOL bQueryPrinter);
90
91 }; //DJ9xx
92
93
94 class DJ970Mode1 : public PrintMode
95 {
96 public:
97     DJ970Mode1();
98 }; //DJ970Mode1
99
100
101 class DJ970Mode2 : public PrintMode
102 {
103 public:
104     DJ970Mode2();
105 }; //DJ970Mode2
106
107
108 #ifdef APDK_EXTENDED_MEDIASIZE
109
110 class DJ970Mode3 : public GrayMode
111 {
112 public:
113     DJ970Mode3 ();
114 }; //DJ970Mode3
115
116 class DJ970Mode4 : public PrintMode
117 {
118 public:
119     DJ970Mode4 ();
120 };
121
122 class DJ970Mode5 : public PrintMode
123 {
124 public:
125     DJ970Mode5 ();
126 };
127
128 class DJ970ModePres : public PrintMode
129 {
130 public:
131     DJ970ModePres();
132
133 };
134
135 class DJ970ModePhotoPres : public PrintMode
136 {
137 public:
138     DJ970ModePhotoPres();
139
140 };
141
142 #endif // APDK_EXTENDED_MEDIASIZE
143
144 #ifdef APDK_DJ9xx
145 //! DJ9xxProxy
146 /*!
147 ******************************************************************************/
148 class DJ9xxProxy : public PrinterProxy
149 {
150 public:
151     DJ9xxProxy() : PrinterProxy(
152         "DJ9xx",                    // family name
153         "DESKJET 91\0"              // DeskJet 91x Series
154         "DESKJET 92\0"              // DeskJet 920
155         "DESKJET 93\0"              // DeskJet 93x Series
156         "DESKJET 94\0"              // DeskJet 94x Series
157         "DESKJET 95\0"              // DeskJet 95x Series
158         "DESKJET 97\0"              // DeskJet 97x Series
159         "DESKJET 1120\0"            // DeskJet 1120
160         "DESKJET 1125\0"            // DeskJet 1125
161         "DESKJET 3810\0"            // DeskJet 3810
162         "DESKJET 3816\0"            // DeskJet 3816
163         "DESKJET 3820\0"            // DeskJet 3820
164         "DESKJET 3822\0"            // DeskJet 3822
165         "PHOTOSMART P1000\0"        // PSP 1000
166         "PHOTOSMART P1100\0"        // PSP 1100
167         "DESKJET 1220\0"            // DeskJet 1220
168         "Deskjet 1280\0"         // Deskjet 1280
169                 "hp deskjet 9300\0"         // deskjet 9300
170 #ifdef APDK_MLC_PRINTER
171         "OfficeJet K\0"             // OfficeJet K Series
172         "OfficeJet V\0"             // OfficeJet V Series
173         "OfficeJet G\0"             // OfficeJet G Series
174         "PSC 7\0"                   // PSC 750
175         "PSC 9\0"                   // PSC 900 Series
176                 "officejet 5100 series\0"   // officejet 5100 series
177         "HP 2000C\0"
178 #endif
179     ) {m_iPrinterType = eDJ9xx;}
180     inline Printer* CreatePrinter(SystemServices* pSS) const { return new DJ9xx(pSS); }
181         inline PRINTER_TYPE GetPrinterType() const { return eDJ9xx;}
182         inline unsigned int GetModelBit() const { return 0x20000;}
183 };
184 #endif
185
186 APDK_END_NAMESPACE
187
188 #endif //APDK_DJ9XX_H