1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
30 #define SAL_DRIVERDATA_SYSSIGN ((sal_uIntPtr)0x574E5433)
36 sal_uIntPtr mnSysSignature
;
37 sal_uInt16 mnDriverOffset
;
43 // ---------------------
44 // - WinSalInfoPrinter -
45 // ---------------------
49 class WinSalInfoPrinter
: public SalInfoPrinter
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
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
);
82 class WinSalPrinter
: public SalPrinter
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
98 virtual ~WinSalPrinter();
100 using SalPrinter::StartJob
;
101 virtual sal_Bool
StartJob( const OUString
* pFileName
,
102 const OUString
& rJobName
,
103 const OUString
& rAppName
,
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();
115 bool isValid() const { return mbValid
; }
118 #endif // _SV_SALPRN_H
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */