Bug 1728955: part 6) Log result of Windows' `OleSetClipboardResult`. r=masayuki
[gecko.git] / gfx / thebes / PrintTargetPS.h
blob82079927485cf7244b66f599836e32bec97f4fa5
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_PRINTINGTARGETPS_H
7 #define MOZILLA_GFX_PRINTINGTARGETPS_H
9 #include "nsCOMPtr.h"
10 #include "nsIOutputStream.h"
11 #include "PrintTarget.h"
13 namespace mozilla {
14 namespace gfx {
16 /**
17 * PostScript printing target.
19 class PrintTargetPS final : public PrintTarget {
20 public:
21 enum PageOrientation { PORTRAIT, LANDSCAPE };
23 static already_AddRefed<PrintTargetPS> CreateOrNull(
24 nsIOutputStream* aStream, IntSize aSizeInPoints,
25 PageOrientation aOrientation);
27 virtual nsresult BeginPrinting(const nsAString& aTitle,
28 const nsAString& aPrintToFileName,
29 int32_t aStartPage, int32_t aEndPage) override;
30 nsresult EndPage() override;
31 void Finish() override;
33 bool GetRotateForLandscape() { return (mOrientation == LANDSCAPE); }
35 private:
36 PrintTargetPS(cairo_surface_t* aCairoSurface, const IntSize& aSize,
37 nsIOutputStream* aStream, PageOrientation aOrientation);
38 virtual ~PrintTargetPS();
40 nsCOMPtr<nsIOutputStream> mStream;
41 PageOrientation mOrientation;
44 } // namespace gfx
45 } // namespace mozilla
47 #endif /* MOZILLA_GFX_PRINTINGTARGETPS_H */