update dev300-m58
[ooovba.git] / vcl / os2 / inc / salprn.h
blobc77e0f7dcc242e12580bf8dbf13bb5c075278c15
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: salprn.h,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SV_SALPRN_H
32 #define _SV_SALPRN_H
34 #include <vcl/sv.h>
35 #include <vcl/salprn.hxx>
37 class SalGraphics;
38 class SalInfoPrinter;
40 struct ImplFormInfo;
41 typedef ImplFormInfo* PIMPLFORMINFO;
42 struct ImplTrayInfo;
43 typedef ImplTrayInfo* PIMPLTRAYINFO;
45 // ----------------------
46 // - SalInfoPrinterData -
47 // ----------------------
49 //class SalInfoPrinterData
50 class Os2SalInfoPrinter : public SalInfoPrinter
52 public:
53 Os2SalGraphics* mpGraphics; // Graphics
54 HDC mhDC; // printer hdc
55 HPS mhPS; // printer hps
56 ByteString maPrinterName; // pszPrinters
57 ByteString maName; // pszName bzw. LogAdress
58 ByteString maDriverName; // pszDriverName nach .
59 ByteString maDeviceName; // pszDriverName bis .
60 ByteString maJobSetupDeviceName; // DeviceName aus pDriverData
61 PIMPLFORMINFO* mpFormArray; // PaperForm-Names
62 USHORT mnFormCount; // PaperForm-Count
63 PIMPLTRAYINFO* mpTrayArray; // PaperTray-Names
64 USHORT mnTrayCount; // PaperTray-Count
65 BOOL mbDJPSupported; // is driver DJP enabled
66 BOOL mbGraphics; // is Graphics used
68 public:
69 Os2SalInfoPrinter();
70 virtual ~Os2SalInfoPrinter();
72 virtual SalGraphics* GetGraphics();
73 virtual void ReleaseGraphics( SalGraphics* pGraphics );
74 virtual BOOL Setup( SalFrame* pFrame, ImplJobSetup* pSetupData );
75 virtual BOOL SetPrinterData( ImplJobSetup* pSetupData );
76 virtual BOOL SetData( ULONG nFlags, ImplJobSetup* pSetupData );
77 virtual void GetPageInfo( const ImplJobSetup* pSetupData,
78 long& rOutWidth, long& rOutHeight,
79 long& rPageOffX, long& rPageOffY,
80 long& rPageWidth, long& rPageHeight );
81 virtual ULONG GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType );
82 virtual ULONG GetPaperBinCount( const ImplJobSetup* pSetupData );
83 virtual String GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin );
84 virtual void InitPaperFormats( const ImplJobSetup* pSetupData );
85 virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData );
86 virtual DuplexMode GetDuplexMode( const ImplJobSetup* pSetupData );
89 // ------------------
90 // - SalPrinterData -
91 // ------------------
93 class SalPrinterData00
95 public:
96 Os2SalGraphics* mpGraphics; // current Printer graphics
97 SalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter
98 HDC mhDC; // printer hdc
99 HPS mhPS; // printer hps
100 ULONG mnError; // Error Code
101 BOOL mbFirstPage; // IsFirstPage
102 BOOL mbAbort; // JobAborted
103 BOOL mbPrintDJPSupported; // is driver PrintDJP enabled (DEVESC_NEWFRAME_WPROP)
104 char maCommentBuf[33]; // Comment
105 char maCopyBuf[10]; // Kopien
108 // -----------------
109 // - Os2SalPrinter -
110 // -----------------
112 class Os2SalPrinter : public SalPrinter
114 public:
115 Os2SalGraphics* mpGraphics; // current Printer graphics
116 Os2SalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter
117 Os2SalPrinter* mpNextPrinter; // next printing printer
118 HDC mhDC; // printer hdc
119 HPS mhPS; // printer hps
120 ULONG mnError; // Error Code
121 BOOL mbFirstPage; // IsFirstPage
122 BOOL mbAbort; // JobAborted
123 BOOL mbPrintDJPSupported; // is driver PrintDJP enabled (DEVESC_NEWFRAME_WPROP)
124 char maCommentBuf[33]; // Comment
125 char maCopyBuf[16]; // Kopien
126 //HDC mhDC; // printer hdc
127 //ULONG mnError; // Error Code
128 //ULONG mnCopies; // Kopien
129 //BOOL mbCollate; // Sortierte Kopien
130 //BOOL mbAbort; // Job Aborted
132 public:
133 Os2SalPrinter();
134 virtual ~Os2SalPrinter();
136 virtual BOOL StartJob( const XubString* pFileName,
137 const XubString& rJobName,
138 const XubString& rAppName,
139 ULONG nCopies, BOOL bCollate,
140 ImplJobSetup* pSetupData );
141 virtual BOOL EndJob();
142 virtual BOOL AbortJob();
143 virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData );
144 virtual BOOL EndPage();
145 virtual ULONG GetErrorCode();
148 #endif // _SV_SALPRN_H