Bug 1874684 - Part 28: Return DateDuration from DifferenceISODateTime. r=mgaudet
[gecko.git] / gfx / thebes / PrintTargetWindows.h
blobf305fb9bf56222c1f1111d2c2583b8cab1db6c11
1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef MOZILLA_GFX_PRINTTARGETWINDOWS_H
7 #define MOZILLA_GFX_PRINTTARGETWINDOWS_H
9 #include "PrintTarget.h"
11 /* include windows.h for the HDC definitions that we need. */
12 #include <windows.h>
14 namespace mozilla {
15 namespace gfx {
17 /**
18 * Windows printing target.
20 class PrintTargetWindows final : public PrintTarget {
21 public:
22 static already_AddRefed<PrintTargetWindows> CreateOrNull(HDC aDC);
24 nsresult BeginPrinting(const nsAString& aTitle,
25 const nsAString& aPrintToFileName, int32_t aStartPage,
26 int32_t aEndPage) override;
27 nsresult EndPrinting() override;
28 nsresult AbortPrinting() override;
29 nsresult BeginPage(const IntSize& aSizeInPoints) override;
30 nsresult EndPage() override;
32 private:
33 PrintTargetWindows(cairo_surface_t* aCairoSurface, const IntSize& aSize,
34 HDC aDC);
35 HDC mDC;
38 } // namespace gfx
39 } // namespace mozilla
41 #endif /* MOZILLA_GFX_PRINTTARGETWINDOWS_H */