~mimose/+junk/hplip-3.16.11

« back to all changes in this revision

Viewing changes to prnt/hpijs/ljcolor.h

  • Committer: guoyalong
  • Date: 2017-09-20 10:13:05 UTC
  • Revision ID: guoyalong@kylinos.cn-20170920101305-82zaolzpv1qghz29
Modified debian/control & debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************************\
 
2
  ljcolor.h : Interface for the LJColor class
 
3
 
 
4
  Copyright (c) 1996 - 2015, HP 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 HP 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_LJCOLOR_H
 
33
#define APDK_LJCOLOR_H
 
34
 
 
35
APDK_BEGIN_NAMESPACE
 
36
 
 
37
/*!
 
38
\internal
 
39
*/
 
40
class LJColor : public Printer
 
41
{
 
42
public:
 
43
    LJColor (SystemServices* pSS,int numfonts=0, BOOL proto=FALSE);
 
44
    ~LJColor ();
 
45
 
 
46
    virtual Header* SelectHeader (PrintContext* pc);
 
47
    virtual DRIVER_ERROR VerifyPenInfo ();
 
48
    virtual DRIVER_ERROR ParsePenInfo (PEN_TYPE& ePen, BOOL QueryPrinter=TRUE);
 
49
    virtual DISPLAY_STATUS ParseError (BYTE status_reg);
 
50
        inline virtual BOOL SupportSeparateBlack (PrintMode *pCurrentMode) {return FALSE;}
 
51
    DRIVER_ERROR SkipRasters (int nBlankRasters);
 
52
        virtual DRIVER_ERROR Flush (int FlushSize)
 
53
        {
 
54
                return NO_ERROR;
 
55
        }
 
56
 
 
57
    virtual BOOL GetMargins (PAPER_SIZE ps, float *fMargins)
 
58
    {
 
59
        fMargins[0] = (float) 0.25;
 
60
        fMargins[1] = (float) 0.25;
 
61
        fMargins[2] = (float) 0.2;
 
62
        fMargins[3] = (float) 0.2;
 
63
        return TRUE;
 
64
    }
 
65
 
 
66
    virtual BOOL UseCMYK (unsigned int iPrintMode) { return FALSE;}
 
67
        virtual DRIVER_ERROR Encapsulate (const RASTERDATA* InputRaster, BOOL bLastPlane);
 
68
 
 
69
#ifdef APDK_AUTODUPLEX
 
70
 
 
71
/*
 
72
 *  Note that we are returning TRUE here not to say there is a Hagaki Feed tray
 
73
 *  and Hagaki Card duplexer. Some non-HP Lasers number their input trays
 
74
 *  differently and try 5 (sourceHagakiFeedNDuplexer) can be a valid input tray.
 
75
 *  In order to allow selection of this tray, we will return TRUE for all lasers.
 
76
 */
 
77
 
 
78
    virtual BOOL HagakiFeedDuplexerPresent (BOOL bQueryPrinter)
 
79
    {
 
80
        return TRUE;
 
81
    }
 
82
#endif
 
83
 
 
84
    Compressor* CreateCompressor (unsigned int RasterSize);
 
85
        BOOL    bFGColorSet;
 
86
    BOOL    bGrey_K;
 
87
    int     m_iYPos;
 
88
 
 
89
protected:
 
90
 
 
91
#ifdef APDK_HP_UX
 
92
    virtual LJColor & operator = (Printer& rhs)
 
93
    {
 
94
        return *this;
 
95
    }
 
96
#endif
 
97
 
 
98
    BOOL        m_bJobStarted;
 
99
    int         m_iYResolution;
 
100
    Compressor  *m_pCompressor;
 
101
 
 
102
}; // LJColor
 
103
 
 
104
class LJColorKDraftMode : public GrayMode
 
105
{
 
106
public:
 
107
        LJColorKDraftMode ();
 
108
};      // LJColorDraftMode
 
109
 
 
110
class LJColorGrayMode : public GrayMode
 
111
{
 
112
public:
 
113
        LJColorGrayMode ();
 
114
}; // LJColorGrayMode
 
115
 
 
116
class LJColor150DPIMode : public PrintMode
 
117
{
 
118
public:
 
119
    LJColor150DPIMode ();
 
120
}; // LJColor150DPIMode
 
121
 
 
122
class LJColor300DPIMode : public PrintMode
 
123
{
 
124
public:
 
125
    LJColor300DPIMode ();
 
126
};   // LJColor300DPIMode
 
127
 
 
128
class LJColor600DPIMode : public PrintMode
 
129
{
 
130
public:
 
131
    LJColor600DPIMode ();
 
132
};   // LJColor600DPIMode
 
133
 
 
134
#ifdef APDK_EXTENDED_MEDIASIZE
 
135
class LJColorPlainBestMode : public PrintMode
 
136
{
 
137
public:
 
138
    LJColorPlainBestMode ();
 
139
};
 
140
#endif
 
141
 
 
142
#ifdef APDK_LJCOLOR
 
143
//! LJColorProxy
 
144
/*!
 
145
******************************************************************************/
 
146
class LJColorProxy : public PrinterProxy
 
147
{
 
148
public:
 
149
    LJColorProxy() : PrinterProxy(
 
150
        "ColorLaser",                   // family name
 
151
        "hp color LaserJet\0"
 
152
                "HP Color LaserJet\0"
 
153
                "hp business inkjet 2600\0"
 
154
                "hp business inkjet 3000\0"
 
155
                "hp business inkjet 2300\0"
 
156
                "Officejet 9100\0"
 
157
#ifdef APDK_MLC_PRINTER
 
158
#endif
 
159
    ) {m_iPrinterType = eLJColor;}
 
160
    inline Printer* CreatePrinter(SystemServices* pSS) const { return new LJColor(pSS); }
 
161
        inline PRINTER_TYPE GetPrinterType() const { return eLJColor;}
 
162
        inline unsigned int GetModelBit() const { return 0x20;}
 
163
};
 
164
#endif
 
165
 
 
166
APDK_END_NAMESPACE
 
167
 
 
168
#endif //APDK_LJCOLOR_H