bump product version to 4.1.6.2
[LibreOffice.git] / vcl / inc / win / salprn.h
blobd33716b9413d8bd2628240bebaedbf8b8a780836
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 _SV_SALPRN_H
21 #define _SV_SALPRN_H
23 #include <salprn.hxx>
25 // -----------------
26 // - SalDriverData -
27 // -----------------
29 // WNT3
30 #define SAL_DRIVERDATA_SYSSIGN ((sal_uIntPtr)0x574E5433)
32 #pragma pack( 1 )
34 struct SalDriverData
36 sal_uIntPtr mnSysSignature;
37 sal_uInt16 mnDriverOffset;
38 BYTE maDriverData[1];
41 #pragma pack()
43 // ---------------------
44 // - WinSalInfoPrinter -
45 // ---------------------
47 class WinSalGraphics;
49 class WinSalInfoPrinter : public SalInfoPrinter
51 public:
52 WinSalGraphics* mpGraphics; // current Printer graphics
53 OUString maDriverName; // printer driver name
54 OUString maDeviceName; // printer device name
55 OUString maPortName; // printer port name
56 HDC mhDC; // printer hdc
57 sal_Bool mbGraphics; // is Graphics used
58 public:
59 WinSalInfoPrinter();
60 virtual ~WinSalInfoPrinter();
62 virtual SalGraphics* GetGraphics();
63 virtual void ReleaseGraphics( SalGraphics* pGraphics );
64 virtual sal_Bool Setup( SalFrame* pFrame, ImplJobSetup* pSetupData );
65 virtual sal_Bool SetPrinterData( ImplJobSetup* pSetupData );
66 virtual sal_Bool SetData( sal_uIntPtr nFlags, ImplJobSetup* pSetupData );
67 virtual void GetPageInfo( const ImplJobSetup* pSetupData,
68 long& rOutWidth, long& rOutHeight,
69 long& rPageOffX, long& rPageOffY,
70 long& rPageWidth, long& rPageHeight );
71 virtual sal_uIntPtr GetCapabilities( const ImplJobSetup* pSetupData, sal_uInt16 nType );
72 virtual sal_uIntPtr GetPaperBinCount( const ImplJobSetup* pSetupData );
73 virtual OUString GetPaperBinName( const ImplJobSetup* pSetupData, sal_uIntPtr nPaperBin );
74 virtual void InitPaperFormats( const ImplJobSetup* pSetupData );
75 virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData );
78 // -----------------
79 // - WinSalPrinter -
80 // -----------------
82 class WinSalPrinter : public SalPrinter
84 public:
85 WinSalGraphics* mpGraphics; // current Printer graphics
86 WinSalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter
87 WinSalPrinter* mpNextPrinter; // next printing printer
88 HDC mhDC; // printer hdc
89 sal_uIntPtr mnError; // Error Code
90 sal_uIntPtr mnCopies; // Kopien
91 sal_Bool mbCollate; // Sortierte Kopien
92 sal_Bool mbAbort; // Job Aborted
94 bool mbValid;
96 public:
97 WinSalPrinter();
98 virtual ~WinSalPrinter();
100 using SalPrinter::StartJob;
101 virtual sal_Bool StartJob( const OUString* pFileName,
102 const OUString& rJobName,
103 const OUString& rAppName,
104 sal_uIntPtr nCopies,
105 bool bCollate,
106 bool bDirect,
107 ImplJobSetup* pSetupData );
108 virtual sal_Bool EndJob();
109 virtual sal_Bool AbortJob();
110 virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, sal_Bool bNewJobData );
111 virtual sal_Bool EndPage();
112 virtual sal_uIntPtr GetErrorCode();
114 void markInvalid();
115 bool isValid() const { return mbValid; }
118 #endif // _SV_SALPRN_H
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */