| 1 | /*****************************************************************************\ |
| 2 | ojprokx50.h : Interface for the generic VIP printer class |
| 3 | |
| 4 | Copyright (c) 2001 - 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_OJ_PROKX50_H |
| 33 | #define APDK_OJ_PROKX50_H |
| 34 | |
| 35 | APDK_BEGIN_NAMESPACE |
| 36 | |
| 37 | //OJProKX50 |
| 38 | //! |
| 39 | /*! |
| 40 | \internal |
| 41 | ******************************************************************************/ |
| 42 | class OJProKx50 : public DJ9xxVIP |
| 43 | { |
| 44 | public: |
| 45 | OJProKx50 (SystemServices* pSS, BOOL proto = FALSE) : DJ9xxVIP (pSS, proto) |
| 46 | { |
| 47 | // Papertype for marvellous mode must be mediaGlossy (3) for these printers |
| 48 | pMode[4]->medium = mediaGlossy; |
| 49 | } |
| 50 | virtual BOOL GetMargins (PAPER_SIZE ps, float *fMargins) |
| 51 | { |
| 52 | fMargins[0] = (float) 0.125; |
| 53 | fMargins[1] = (float) 0.125; |
| 54 | fMargins[2] = (float) 0.125; |
| 55 | fMargins[3] = (float) 0.5; |
| 56 | if (ps == SUPERB_SIZE) |
| 57 | { |
| 58 | fMargins[0] = (float) 0.125; |
| 59 | fMargins[1] = (float) 0.5; |
| 60 | fMargins[2] = (float) 0.125; |
| 61 | fMargins[3] = (float) 0.75; |
| 62 | } |
| 63 | return TRUE; |
| 64 | } |
| 65 | }; |
| 66 | |
| 67 | #if defined (APDK_DJ9xxVIP) |
| 68 | //! OJProKX50Proxy |
| 69 | /*! |
| 70 | ******************************************************************************/ |
| 71 | class OJProKx50Proxy : public PrinterProxy |
| 72 | { |
| 73 | public: |
| 74 | OJProKx50Proxy() : PrinterProxy( |
| 75 | "OJProKx50", // family name |
| 76 | "Officejet Pro K550\0" |
| 77 | "Officejet Pro K850\0" |
| 78 | ) {m_iPrinterType = eOJProKx50;} |
| 79 | inline Printer* CreatePrinter(SystemServices* pSS) const { return new OJProKx50(pSS); } |
| 80 | inline PRINTER_TYPE GetPrinterType() const { return eOJProKx50;} |
| 81 | inline unsigned int GetModelBit() const { return 0x200;} |
| 82 | }; |
| 83 | #endif |
| 84 | |
| 85 | APDK_END_NAMESPACE |
| 86 | |
| 87 | #endif // APDK_OJ_PROKX50_H |