Bumping gaia.json for 1 gaia revision(s) a=gaia-bump
[gecko.git] / widget / qt / nsDeviceContextSpecQt.h
blob9ec1f567e16b935cffa2a72db1c8df5013598e34
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"
13 #include "nsCOMPtr.h"
14 #include "nsString.h"
16 #include "nsCRT.h" /* should be <limits.h>? */
18 class nsDeviceContextSpecQt : public nsIDeviceContextSpec
20 public:
21 nsDeviceContextSpecQt();
23 NS_DECL_ISUPPORTS
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,
32 int32_t aStartPage,
33 int32_t aEndPage);
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);
40 protected:
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 */
48 nsCString mSpoolName;
49 nsCOMPtr<nsIFile> mSpoolFile;
52 class nsPrinterEnumeratorQt : public nsIPrinterEnumerator
54 public:
55 nsPrinterEnumeratorQt();
56 NS_DECL_ISUPPORTS
57 NS_DECL_NSIPRINTERENUMERATOR
59 protected:
60 virtual ~nsPrinterEnumeratorQt();
64 #endif /* !nsDeviceContextSpecQt_h___ */