Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | |
michael@0 | 7 | #ifndef nsDeviceContextSpecQt_h___ |
michael@0 | 8 | #define nsDeviceContextSpecQt_h___ |
michael@0 | 9 | |
michael@0 | 10 | #include "nsIDeviceContextSpec.h" |
michael@0 | 11 | #include "nsIPrintSettings.h" |
michael@0 | 12 | #include "nsIPrintOptions.h" |
michael@0 | 13 | #include "nsCOMPtr.h" |
michael@0 | 14 | #include "nsString.h" |
michael@0 | 15 | |
michael@0 | 16 | #include "nsCRT.h" /* should be <limits.h>? */ |
michael@0 | 17 | |
michael@0 | 18 | class nsDeviceContextSpecQt : public nsIDeviceContextSpec |
michael@0 | 19 | { |
michael@0 | 20 | public: |
michael@0 | 21 | nsDeviceContextSpecQt(); |
michael@0 | 22 | virtual ~nsDeviceContextSpecQt(); |
michael@0 | 23 | |
michael@0 | 24 | NS_DECL_ISUPPORTS |
michael@0 | 25 | |
michael@0 | 26 | NS_IMETHOD GetSurfaceForPrinter(gfxASurface** surface); |
michael@0 | 27 | |
michael@0 | 28 | NS_IMETHOD Init(nsIWidget* aWidget, |
michael@0 | 29 | nsIPrintSettings* aPS, |
michael@0 | 30 | bool aIsPrintPreview); |
michael@0 | 31 | NS_IMETHOD BeginDocument(const nsAString& aTitle, |
michael@0 | 32 | char16_t* aPrintToFileName, |
michael@0 | 33 | int32_t aStartPage, |
michael@0 | 34 | int32_t aEndPage); |
michael@0 | 35 | NS_IMETHOD EndDocument(); |
michael@0 | 36 | NS_IMETHOD BeginPage() { return NS_OK; } |
michael@0 | 37 | NS_IMETHOD EndPage() { return NS_OK; } |
michael@0 | 38 | |
michael@0 | 39 | NS_IMETHOD GetPath (const char** aPath); |
michael@0 | 40 | |
michael@0 | 41 | protected: |
michael@0 | 42 | nsCOMPtr<nsIPrintSettings> mPrintSettings; |
michael@0 | 43 | bool mToPrinter : 1; /* If true, print to printer */ |
michael@0 | 44 | bool mIsPPreview : 1; /* If true, is print preview */ |
michael@0 | 45 | char mPath[PATH_MAX]; /* If toPrinter = false, dest file */ |
michael@0 | 46 | char mPrinter[256]; /* Printer name */ |
michael@0 | 47 | nsCString mSpoolName; |
michael@0 | 48 | nsCOMPtr<nsIFile> mSpoolFile; |
michael@0 | 49 | }; |
michael@0 | 50 | |
michael@0 | 51 | class nsPrinterEnumeratorQt : public nsIPrinterEnumerator |
michael@0 | 52 | { |
michael@0 | 53 | public: |
michael@0 | 54 | nsPrinterEnumeratorQt(); |
michael@0 | 55 | NS_DECL_ISUPPORTS |
michael@0 | 56 | NS_DECL_NSIPRINTERENUMERATOR |
michael@0 | 57 | }; |
michael@0 | 58 | |
michael@0 | 59 | #endif /* !nsDeviceContextSpecQt_h___ */ |