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_PRINTTARGETCG_H
7 #define MOZILLA_GFX_PRINTTARGETCG_H
9 #include <Carbon/Carbon.h>
10 #include "PrintTarget.h"
16 * CoreGraphics printing target.
18 class PrintTargetCG final
: public PrintTarget
{
20 static already_AddRefed
<PrintTargetCG
> CreateOrNull(
21 PMPrintSession aPrintSession
, PMPageFormat aPageFormat
,
22 PMPrintSettings aPrintSettings
, const IntSize
& aSize
);
24 nsresult
BeginPrinting(const nsAString
& aTitle
,
25 const nsAString
& aPrintToFileName
, int32_t aStartPage
,
26 int32_t aEndPage
) final
;
27 nsresult
EndPrinting() final
;
28 nsresult
AbortPrinting() final
;
29 nsresult
BeginPage() final
;
30 nsresult
EndPage() final
;
32 already_AddRefed
<DrawTarget
> GetReferenceDrawTarget() final
;
35 PrintTargetCG(PMPrintSession aPrintSession
, PMPageFormat aPageFormat
,
36 PMPrintSettings aPrintSettings
, const IntSize
& aSize
);
39 PMPrintSession mPrintSession
;
40 PMPageFormat mPageFormat
;
41 PMPrintSettings mPrintSettings
;
45 } // namespace mozilla
47 #endif /* MOZILLA_GFX_PRINTTARGETCG_H */