1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/. */
7 #ifndef nsDeviceContextSpecQt_h___
8 #define nsDeviceContextSpecQt_h___
10 #include "nsIDeviceContextSpec.h"
11 #include "nsIPrintSettings.h"
12 #include "nsIPrintOptions.h"
16 #include "nsCRT.h" /* should be <limits.h>? */
18 class nsDeviceContextSpecQt
: public nsIDeviceContextSpec
21 nsDeviceContextSpecQt();
22 virtual ~nsDeviceContextSpecQt();
26 NS_IMETHOD
GetSurfaceForPrinter(gfxASurface
** surface
);
28 NS_IMETHOD
Init(nsIWidget
* aWidget
,
29 nsIPrintSettings
* aPS
,
30 bool aIsPrintPreview
);
31 NS_IMETHOD
BeginDocument(const nsAString
& aTitle
,
32 char16_t
* aPrintToFileName
,
35 NS_IMETHOD
EndDocument();
36 NS_IMETHOD
BeginPage() { return NS_OK
; }
37 NS_IMETHOD
EndPage() { return NS_OK
; }
39 NS_IMETHOD
GetPath (const char** aPath
);
42 nsCOMPtr
<nsIPrintSettings
> mPrintSettings
;
43 bool mToPrinter
: 1; /* If true, print to printer */
44 bool mIsPPreview
: 1; /* If true, is print preview */
45 char mPath
[PATH_MAX
]; /* If toPrinter = false, dest file */
46 char mPrinter
[256]; /* Printer name */
48 nsCOMPtr
<nsIFile
> mSpoolFile
;
51 class nsPrinterEnumeratorQt
: public nsIPrinterEnumerator
54 nsPrinterEnumeratorQt();
56 NS_DECL_NSIPRINTERENUMERATOR
59 #endif /* !nsDeviceContextSpecQt_h___ */