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();
25 NS_IMETHOD
GetSurfaceForPrinter(gfxASurface
** surface
);
27 NS_IMETHOD
Init(nsIWidget
* aWidget
,
28 nsIPrintSettings
* aPS
,
29 bool aIsPrintPreview
);
30 NS_IMETHOD
BeginDocument(const nsAString
& aTitle
,
31 char16_t
* aPrintToFileName
,
34 NS_IMETHOD
EndDocument();
35 NS_IMETHOD
BeginPage() { return NS_OK
; }
36 NS_IMETHOD
EndPage() { return NS_OK
; }
38 NS_IMETHOD
GetPath (const char** aPath
);
41 virtual ~nsDeviceContextSpecQt();
43 nsCOMPtr
<nsIPrintSettings
> mPrintSettings
;
44 bool mToPrinter
: 1; /* If true, print to printer */
45 bool mIsPPreview
: 1; /* If true, is print preview */
46 char mPath
[PATH_MAX
]; /* If toPrinter = false, dest file */
47 char mPrinter
[256]; /* Printer name */
49 nsCOMPtr
<nsIFile
> mSpoolFile
;
52 class nsPrinterEnumeratorQt
: public nsIPrinterEnumerator
55 nsPrinterEnumeratorQt();
57 NS_DECL_NSIPRINTERENUMERATOR
60 virtual ~nsPrinterEnumeratorQt();
64 #endif /* !nsDeviceContextSpecQt_h___ */