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. */
18 * Windows printing target.
20 class PrintTargetWindows final
: public PrintTarget
{
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
;
33 PrintTargetWindows(cairo_surface_t
* aCairoSurface
, const IntSize
& aSize
,
39 } // namespace mozilla
41 #endif /* MOZILLA_GFX_PRINTTARGETWINDOWS_H */