Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / vcl / inc / win / salprn.h
bloba483e2502cc787eb4b52d96796c223251452cab7
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_VCL_INC_WIN_SALPRN_H
21 #define INCLUDED_VCL_INC_WIN_SALPRN_H
23 #include <salprn.hxx>
26 // WNT3
27 #define SAL_DRIVERDATA_SYSSIGN ((sal_uIntPtr)0x574E5433)
29 #pragma pack( 1 )
31 struct SalDriverData
33 sal_uIntPtr mnSysSignature;
34 sal_uInt16 mnDriverOffset;
35 BYTE maDriverData[1];
38 #pragma pack()
41 class WinSalGraphics;
43 class WinSalInfoPrinter : public SalInfoPrinter
45 public:
46 WinSalGraphics* mpGraphics; // current Printer graphics
47 OUString maDriverName; // printer driver name
48 OUString maDeviceName; // printer device name
49 OUString maPortName; // printer port name
50 HDC mhDC; // printer hdc
51 bool mbGraphics; // is Graphics used
52 public:
53 WinSalInfoPrinter();
54 virtual ~WinSalInfoPrinter() override;
56 virtual SalGraphics* AcquireGraphics() override;
57 virtual void ReleaseGraphics( SalGraphics* pGraphics ) override;
58 virtual bool Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ) override;
59 virtual bool SetPrinterData( ImplJobSetup* pSetupData ) override;
60 virtual bool SetData( JobSetFlags nFlags, ImplJobSetup* pSetupData ) override;
61 virtual void GetPageInfo( const ImplJobSetup* pSetupData,
62 long& rOutWidth, long& rOutHeight,
63 long& rPageOffX, long& rPageOffY,
64 long& rPageWidth, long& rPageHeight ) override;
65 virtual sal_uInt32 GetCapabilities( const ImplJobSetup* pSetupData, PrinterCapType nType ) override;
66 virtual sal_uInt16 GetPaperBinCount( const ImplJobSetup* pSetupData ) override;
67 virtual OUString GetPaperBinName( const ImplJobSetup* pSetupData, sal_uInt16 nPaperBin ) override;
68 virtual void InitPaperFormats( const ImplJobSetup* pSetupData ) override;
69 virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData ) override;
73 class WinSalPrinter : public SalPrinter
75 public:
76 WinSalGraphics* mpGraphics; // current Printer graphics
77 WinSalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter
78 WinSalPrinter* mpNextPrinter; // next printing printer
79 HDC mhDC; // printer hdc
80 sal_uIntPtr mnError; // Error Code
81 sal_uIntPtr mnCopies; // Kopien
82 bool mbCollate; // Sortierte Kopien
83 bool mbAbort; // Job Aborted
85 bool mbValid;
87 public:
88 WinSalPrinter();
89 virtual ~WinSalPrinter() override;
91 using SalPrinter::StartJob;
92 virtual bool StartJob( const OUString* pFileName,
93 const OUString& rJobName,
94 const OUString& rAppName,
95 sal_uInt32 nCopies,
96 bool bCollate,
97 bool bDirect,
98 ImplJobSetup* pSetupData ) override;
99 virtual bool EndJob() override;
100 virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, bool bNewJobData ) override;
101 virtual void EndPage() override;
102 virtual sal_uIntPtr GetErrorCode() override;
104 void markInvalid();
105 bool isValid() const { return mbValid; }
108 #endif // INCLUDED_VCL_INC_WIN_SALPRN_H
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */