xref: /aosp_15_r20/external/pdfium/core/fxge/win32/cpsoutput.h (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1 // Copyright 2016 The PDFium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef CORE_FXGE_WIN32_CPSOUTPUT_H_
8 #define CORE_FXGE_WIN32_CPSOUTPUT_H_
9 
10 #include <stddef.h>
11 #include <windows.h>
12 
13 #include "core/fxcrt/fx_stream.h"
14 
15 class CPSOutput final : public IFX_RetainableWriteStream {
16  public:
17   enum class OutputMode { kExtEscape, kGdiComment };
18 
19   CPSOutput(HDC hDC, OutputMode mode);
20   ~CPSOutput() override;
21 
22   // IFX_Writestream:
23   bool WriteBlock(pdfium::span<const uint8_t> input) override;
24 
25  private:
26   const HDC m_hDC;
27   const OutputMode m_mode;
28 };
29 
30 #endif  // CORE_FXGE_WIN32_CPSOUTPUT_H_
31