Tizen 2.1 base
[platform/upstream/hplip.git] / prnt / hpijs / psp100.h
1 /*****************************************************************************\
2   psp100.h : Interface for the PSP100 class
3
4   Copyright (c) 2001-2002, 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_PSP100_H
33 #define APDK_PSP100_H
34 // PhotoSmart 100
35
36 APDK_BEGIN_NAMESPACE
37
38 //PSP100
39 //!
40 /*!
41 \internal
42 ******************************************************************************/
43 class PSP100 : public DJ9xxVIP
44 {
45 public:
46     PSP100 (SystemServices* pSS, BOOL proto = FALSE);
47
48     DRIVER_ERROR VerifyPenInfo ();
49 //    DRIVER_ERROR ParsePenInfo (PEN_TYPE& ePen, BOOL QueryPrinter = TRUE);
50     virtual PEN_TYPE DefaultPenSet();
51         inline virtual BOOL SupportSeparateBlack (PrintMode *pCurrentMode) {return FALSE;}
52     virtual BOOL UseGUIMode (PrintMode* pPrintMode);
53     PAPER_SIZE    MandatoryPaperSize ();
54     virtual BOOL FullBleedCapable (PAPER_SIZE ps, FullbleedType  *fbType, float *xOverSpray, float *yOverSpray,
55                                    float *fLeftOverSpray, float *fTopOverSpray)
56     {
57         *xOverSpray = (float) 0.12;
58         *yOverSpray = (float) 0.06;
59
60         if (fLeftOverSpray)
61             *fLeftOverSpray = (float) 0.05;
62         if (fTopOverSpray)
63             *fTopOverSpray  = (float) 0.03;
64
65                 if (ps == PHOTO_SIZE || ps == A6_WITH_TEAR_OFF_TAB ||
66             ps == PHOTO_5x7)
67                 {
68                         *fbType = fullbleed4EdgeAllMedia;
69                 }
70                 else
71                 {
72                         *fbType = fullbleed3EdgeAllMedia;
73                 }
74
75         return TRUE;
76     }
77
78 }; //PSP100
79
80
81 //PSP100Mode
82 /*
83 ******************************************************************************/
84 class PSP100Mode : public PrintMode
85 {
86 public:
87     PSP100Mode ();
88 }; //PSP100Mode
89
90 class PSP100NormalMode : public PrintMode
91 {
92 public:
93     PSP100NormalMode ();
94 }; //PSP100NormalMode
95
96 #ifdef APDK_EXTENDED_MEDIASIZE
97 //PSP1002400Mode
98 /*
99 ******************************************************************************/
100 class PSP1002400Mode : public PrintMode
101 {
102 public:
103     PSP1002400Mode ();
104 }; //PSP1002400Mode
105 #endif
106
107 //GrayModePSP100
108 /*
109 ******************************************************************************/
110 class GrayModePSP100 : public PrintMode
111 {
112 public:
113     GrayModePSP100 ();
114
115 }; //GrayModePSP100
116
117
118 #if defined(APDK_PSP100) && defined (APDK_DJ9xxVIP)
119 //! PSP100Proxy
120 /*!
121 ******************************************************************************/
122 class PSP100Proxy : public PrinterProxy
123 {
124 public:
125     PSP100Proxy() : PrinterProxy(
126         "PS100",                // family name
127         "PHOTOSMART 100\0"
128         "PHOTOSMART 130\0"
129         "PHOTOSMART 230\0"
130                 "photosmart 240\0"
131                 "photosmart 140\0"
132 #ifdef APDK_MLC_PRINTER
133 #endif
134     ) {m_iPrinterType = ePSP100;}
135     inline Printer* CreatePrinter(SystemServices* pSS) const { return new PSP100(pSS); }
136         inline PRINTER_TYPE GetPrinterType() const { return ePSP100;}
137         inline unsigned int GetModelBit() const { return 0x200;}
138 };
139 #endif
140
141 APDK_END_NAMESPACE
142
143 #endif  // APDK_PSP100_H