1 /*****************************************************************************\
2 psp100.cpp : Implimentation for the PSP100 class
4 Copyright (c) 2001, Hewlett-Packard Co.
7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions
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.
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 \*****************************************************************************/
31 #if defined(APDK_PSP100) && defined (APDK_DJ9xxVIP)
36 #include "printerproxy.h"
40 // PhotoSmart 100 - AtomAnt
41 PSP100::PSP100 (SystemServices* pSS, BOOL proto)
42 : DJ9xxVIP (pSS, proto)
45 for (unsigned int i = 0; i < ModeCount; i++)
54 if (!proto && IOMode.bDevID)
56 bCheckForCancelButton = TRUE;
57 constructor_error = VerifyPenInfo ();
61 pMode[GRAYMODE_INDEX] = new GrayModePSP100 ();
62 pMode[DEFAULTMODE_INDEX] = new PSP100Mode ();
63 pMode[SPECIALMODE_INDEX] = new PSP100NormalMode ();
67 #ifdef APDK_AUTODUPLEX
68 bDuplexCapable = FALSE;
70 #ifdef APDK_EXTENDED_MEDIASIZE
71 pMode[SPECIALMODE_INDEX+1] = new PSP1002400Mode ();
78 GrayModePSP100::GrayModePSP100 ()
81 #if defined(APDK_VIP_COLORFILTERING)
85 Config.bColorImage=FALSE;
88 * The resolutions here are set to 300 for better performance from Cameras.
89 * REVISIT: Must provide a true 600 dpi printmode later.
92 * See not in dj9xxvip.cpp - 1/9/2002 - JLM
99 ResolutionY[0] = VIP_BASE_RES;
100 medium = mediaGlossy;
101 CompatiblePens[0] = COLOR_PEN;
102 theQuality = qualityPresentation;
103 bFontCapable = FALSE;
108 PEN_TYPE PSP100::DefaultPenSet()
109 { return COLOR_PEN; }
112 PSP100Mode::PSP100Mode () : PrintMode (NULL)
116 * See comments above regarding 300/600 dpi change
119 BaseResX = BaseResY = TextRes = ResolutionX[0] = ResolutionY[0] = VIP_BASE_RES;
121 #if defined(APDK_VIP_COLORFILTERING)
122 Config.bErnie = TRUE;
125 Config.bColorImage = FALSE;
127 medium = mediaGlossy;
128 theQuality = qualityPresentation;
129 pmQuality = QUALITY_BEST;
130 pmMediaType = MEDIA_PHOTO;
131 CompatiblePens[0] = COLOR_PEN;
132 bFontCapable = FALSE;
135 PSP100NormalMode::PSP100NormalMode () : PrintMode (NULL)
139 * See comments above regarding 300/600 dpi change
142 BaseResX = BaseResY = TextRes = ResolutionX[0] = ResolutionY[0] = VIP_BASE_RES;
144 #if defined(APDK_VIP_COLORFILTERING)
145 Config.bErnie = TRUE;
148 Config.bColorImage = FALSE;
150 medium = mediaSpecial;
151 theQuality = qualityNormal;
152 CompatiblePens[0] = COLOR_PEN;
153 bFontCapable = FALSE;
156 #ifdef APDK_EXTENDED_MEDIASIZE
157 PSP1002400Mode::PSP1002400Mode () : PrintMode (NULL)
161 * See comments above regarding 300/600 dpi change
164 BaseResX = BaseResY = TextRes = ResolutionX[0] = ResolutionY[0] = 1200;
166 #if defined(APDK_VIP_COLORFILTERING)
167 Config.bErnie = TRUE;
170 Config.bColorImage = FALSE;
172 medium = mediaHighresPhoto;
173 theQuality = qualityPresentation;
174 pmMediaType = MEDIA_PHOTO;
175 pmQuality = QUALITY_HIGHRES_PHOTO;
176 CompatiblePens[0] = COLOR_PEN;
177 bFontCapable = FALSE;
181 PAPER_SIZE PSP100::MandatoryPaperSize ()
185 } //MandantoryPaperSize
188 BOOL PSP100::UseGUIMode
190 PrintMode* pPrintMode
197 DRIVER_ERROR PSP100::VerifyPenInfo ()
199 DRIVER_ERROR err = NO_ERROR;
201 if(IOMode.bDevID == FALSE)
207 while (ePen == NO_PEN)
209 err = SetPenInfo (str, TRUE);
212 if (*(str-1) == '1' && *(str-2) == '1')
214 pSS->DisplayPrinterStatus (DISPLAY_NO_PENS);
221 if (pSS->BusyWait(500) == JOB_CANCELED)