xref: /AOO41X/main/vcl/inc/os2/salprn.h (revision 24f6443dc28f6479acd9115159f263e09548a0af)
1*24f6443dSAndrew Rist /**************************************************************
2fc9fd3f1SPedro Giffuni  *
3*24f6443dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*24f6443dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*24f6443dSAndrew Rist  * distributed with this work for additional information
6*24f6443dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*24f6443dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*24f6443dSAndrew Rist  * "License"); you may not use this file except in compliance
9*24f6443dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10fc9fd3f1SPedro Giffuni  *
11*24f6443dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12fc9fd3f1SPedro Giffuni  *
13*24f6443dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*24f6443dSAndrew Rist  * software distributed under the License is distributed on an
15*24f6443dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*24f6443dSAndrew Rist  * KIND, either express or implied.  See the License for the
17*24f6443dSAndrew Rist  * specific language governing permissions and limitations
18*24f6443dSAndrew Rist  * under the License.
19fc9fd3f1SPedro Giffuni  *
20*24f6443dSAndrew Rist  *************************************************************/
21*24f6443dSAndrew Rist 
22*24f6443dSAndrew Rist 
23fc9fd3f1SPedro Giffuni 
24fc9fd3f1SPedro Giffuni #ifndef _SV_SALPRN_H
25fc9fd3f1SPedro Giffuni #define _SV_SALPRN_H
26fc9fd3f1SPedro Giffuni 
27fc9fd3f1SPedro Giffuni #include <salprn.hxx>
28fc9fd3f1SPedro Giffuni 
29fc9fd3f1SPedro Giffuni class SalGraphics;
30fc9fd3f1SPedro Giffuni class SalInfoPrinter;
31fc9fd3f1SPedro Giffuni 
32fc9fd3f1SPedro Giffuni struct ImplFormInfo;
33fc9fd3f1SPedro Giffuni typedef ImplFormInfo* PIMPLFORMINFO;
34fc9fd3f1SPedro Giffuni struct ImplTrayInfo;
35fc9fd3f1SPedro Giffuni typedef ImplTrayInfo* PIMPLTRAYINFO;
36fc9fd3f1SPedro Giffuni 
37fc9fd3f1SPedro Giffuni // ----------------------
38fc9fd3f1SPedro Giffuni // - SalInfoPrinterData -
39fc9fd3f1SPedro Giffuni // ----------------------
40fc9fd3f1SPedro Giffuni 
41fc9fd3f1SPedro Giffuni //class SalInfoPrinterData
42fc9fd3f1SPedro Giffuni class Os2SalInfoPrinter : public SalInfoPrinter
43fc9fd3f1SPedro Giffuni {
44fc9fd3f1SPedro Giffuni public:
45fc9fd3f1SPedro Giffuni 	Os2SalGraphics*			mpGraphics; 			// Graphics
46fc9fd3f1SPedro Giffuni 	HDC 					mhDC;					// printer hdc
47fc9fd3f1SPedro Giffuni 	HPS 					mhPS;					// printer hps
48fc9fd3f1SPedro Giffuni 	ByteString					maPrinterName;			// pszPrinters
49fc9fd3f1SPedro Giffuni 	ByteString					maName; 				// pszName bzw. LogAdress
50fc9fd3f1SPedro Giffuni 	ByteString					maDriverName;			// pszDriverName nach .
51fc9fd3f1SPedro Giffuni 	ByteString					maDeviceName;			// pszDriverName bis .
52fc9fd3f1SPedro Giffuni 	ByteString					maJobSetupDeviceName;	// DeviceName aus pDriverData
53fc9fd3f1SPedro Giffuni 	PIMPLFORMINFO*			mpFormArray;			// PaperForm-Names
54fc9fd3f1SPedro Giffuni 	USHORT					mnFormCount;			// PaperForm-Count
55fc9fd3f1SPedro Giffuni 	PIMPLTRAYINFO*			mpTrayArray;			// PaperTray-Names
56fc9fd3f1SPedro Giffuni 	USHORT					mnTrayCount;			// PaperTray-Count
57fc9fd3f1SPedro Giffuni 	sal_Bool					mbDJPSupported; 		// is driver DJP enabled
58fc9fd3f1SPedro Giffuni 	sal_Bool					mbGraphics; 			// is Graphics used
59fc9fd3f1SPedro Giffuni 
60fc9fd3f1SPedro Giffuni public:
61fc9fd3f1SPedro Giffuni     Os2SalInfoPrinter();
62fc9fd3f1SPedro Giffuni     virtual ~Os2SalInfoPrinter();
63fc9fd3f1SPedro Giffuni 
64fc9fd3f1SPedro Giffuni 	virtual SalGraphics*			GetGraphics();
65fc9fd3f1SPedro Giffuni 	virtual void					ReleaseGraphics( SalGraphics* pGraphics );
66fc9fd3f1SPedro Giffuni 	virtual sal_Bool					Setup( SalFrame* pFrame, ImplJobSetup* pSetupData );
67fc9fd3f1SPedro Giffuni 	virtual sal_Bool					SetPrinterData( ImplJobSetup* pSetupData );
68fc9fd3f1SPedro Giffuni 	virtual sal_Bool					SetData( ULONG nFlags, ImplJobSetup* pSetupData );
69fc9fd3f1SPedro Giffuni 	virtual void					GetPageInfo( const ImplJobSetup* pSetupData,
70fc9fd3f1SPedro Giffuni                                                  long& rOutWidth, long& rOutHeight,
71fc9fd3f1SPedro Giffuni                                                  long& rPageOffX, long& rPageOffY,
72fc9fd3f1SPedro Giffuni                                                  long& rPageWidth, long& rPageHeight );
73fc9fd3f1SPedro Giffuni 	virtual ULONG					GetCapabilities( const ImplJobSetup* pSetupData, USHORT nType );
74fc9fd3f1SPedro Giffuni 	virtual ULONG					GetPaperBinCount( const ImplJobSetup* pSetupData );
75fc9fd3f1SPedro Giffuni 	virtual String					GetPaperBinName( const ImplJobSetup* pSetupData, ULONG nPaperBin );
76fc9fd3f1SPedro Giffuni     virtual void					InitPaperFormats( const ImplJobSetup* pSetupData );
77fc9fd3f1SPedro Giffuni     virtual int					GetLandscapeAngle( const ImplJobSetup* pSetupData );
78fc9fd3f1SPedro Giffuni };
79fc9fd3f1SPedro Giffuni 
80fc9fd3f1SPedro Giffuni // ------------------
81fc9fd3f1SPedro Giffuni // - SalPrinterData -
82fc9fd3f1SPedro Giffuni // ------------------
83fc9fd3f1SPedro Giffuni 
84fc9fd3f1SPedro Giffuni class SalPrinterData00
85fc9fd3f1SPedro Giffuni {
86fc9fd3f1SPedro Giffuni public:
87fc9fd3f1SPedro Giffuni 	Os2SalGraphics*			mpGraphics; 			// current Printer graphics
88fc9fd3f1SPedro Giffuni 	SalInfoPrinter* 		mpInfoPrinter;			// pointer to the compatible InfoPrinter
89fc9fd3f1SPedro Giffuni 	HDC 					mhDC;					// printer hdc
90fc9fd3f1SPedro Giffuni 	HPS 					mhPS;					// printer hps
91fc9fd3f1SPedro Giffuni 	ULONG					mnError;				// Error Code
92fc9fd3f1SPedro Giffuni 	sal_Bool					mbFirstPage;			// IsFirstPage
93fc9fd3f1SPedro Giffuni 	sal_Bool					mbAbort;				// JobAborted
94fc9fd3f1SPedro Giffuni 	sal_Bool					mbPrintDJPSupported;	// is driver PrintDJP enabled (DEVESC_NEWFRAME_WPROP)
95fc9fd3f1SPedro Giffuni 	char					maCommentBuf[33];		// Comment
96fc9fd3f1SPedro Giffuni 	char					maCopyBuf[10];			// Kopien
97fc9fd3f1SPedro Giffuni };
98fc9fd3f1SPedro Giffuni 
99fc9fd3f1SPedro Giffuni // -----------------
100fc9fd3f1SPedro Giffuni // - Os2SalPrinter -
101fc9fd3f1SPedro Giffuni // -----------------
102fc9fd3f1SPedro Giffuni 
103fc9fd3f1SPedro Giffuni class Os2SalPrinter : public SalPrinter
104fc9fd3f1SPedro Giffuni {
105fc9fd3f1SPedro Giffuni public:
106fc9fd3f1SPedro Giffuni 	Os2SalGraphics*			mpGraphics; 			// current Printer graphics
107fc9fd3f1SPedro Giffuni 	Os2SalInfoPrinter* 		mpInfoPrinter;			// pointer to the compatible InfoPrinter
108fc9fd3f1SPedro Giffuni 	Os2SalPrinter* 			mpNextPrinter;			// next printing printer
109fc9fd3f1SPedro Giffuni 	HDC 					mhDC;					// printer hdc
110fc9fd3f1SPedro Giffuni 	HPS 					mhPS;					// printer hps
111fc9fd3f1SPedro Giffuni 	ULONG					mnError;				// Error Code
112fc9fd3f1SPedro Giffuni 	sal_Bool					mbFirstPage;			// IsFirstPage
113fc9fd3f1SPedro Giffuni 	sal_Bool					mbAbort;				// JobAborted
114fc9fd3f1SPedro Giffuni 	sal_Bool					mbPrintDJPSupported;	// is driver PrintDJP enabled (DEVESC_NEWFRAME_WPROP)
115fc9fd3f1SPedro Giffuni 	char					maCommentBuf[33];		// Comment
116fc9fd3f1SPedro Giffuni 	char					maCopyBuf[16];			// Kopien
117fc9fd3f1SPedro Giffuni 	//HDC 					mhDC;					// printer hdc
118fc9fd3f1SPedro Giffuni 	//ULONG					mnError;				// Error Code
119fc9fd3f1SPedro Giffuni 	//ULONG					mnCopies;				// Kopien
120fc9fd3f1SPedro Giffuni 	//sal_Bool					mbCollate;				// Sortierte Kopien
121fc9fd3f1SPedro Giffuni 	//sal_Bool					mbAbort;				// Job Aborted
122fc9fd3f1SPedro Giffuni 
123fc9fd3f1SPedro Giffuni public:
124fc9fd3f1SPedro Giffuni     Os2SalPrinter();
125fc9fd3f1SPedro Giffuni     virtual ~Os2SalPrinter();
126fc9fd3f1SPedro Giffuni 
127fc9fd3f1SPedro Giffuni 	virtual sal_Bool					StartJob( const XubString* pFileName,
128fc9fd3f1SPedro Giffuni                                               const XubString& rJobName,
129fc9fd3f1SPedro Giffuni                                               const XubString& rAppName,
130fc9fd3f1SPedro Giffuni                                               ULONG nCopies,
131fc9fd3f1SPedro Giffuni                                               bool bCollate,
132fc9fd3f1SPedro Giffuni                                               bool bDirect,
133fc9fd3f1SPedro Giffuni                                               ImplJobSetup* pSetupData );
134fc9fd3f1SPedro Giffuni 	virtual sal_Bool					EndJob();
135fc9fd3f1SPedro Giffuni 	virtual sal_Bool					AbortJob();
136fc9fd3f1SPedro Giffuni 	virtual SalGraphics*			StartPage( ImplJobSetup* pSetupData, sal_Bool bNewJobData );
137fc9fd3f1SPedro Giffuni 	virtual sal_Bool					EndPage();
138fc9fd3f1SPedro Giffuni 	virtual ULONG					GetErrorCode();
139fc9fd3f1SPedro Giffuni };
140fc9fd3f1SPedro Giffuni 
141fc9fd3f1SPedro Giffuni #endif // _SV_SALPRN_H
142