michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: michael@0: #ifndef nsDeviceContextSpecQt_h___ michael@0: #define nsDeviceContextSpecQt_h___ michael@0: michael@0: #include "nsIDeviceContextSpec.h" michael@0: #include "nsIPrintSettings.h" michael@0: #include "nsIPrintOptions.h" michael@0: #include "nsCOMPtr.h" michael@0: #include "nsString.h" michael@0: michael@0: #include "nsCRT.h" /* should be ? */ michael@0: michael@0: class nsDeviceContextSpecQt : public nsIDeviceContextSpec michael@0: { michael@0: public: michael@0: nsDeviceContextSpecQt(); michael@0: virtual ~nsDeviceContextSpecQt(); michael@0: michael@0: NS_DECL_ISUPPORTS michael@0: michael@0: NS_IMETHOD GetSurfaceForPrinter(gfxASurface** surface); michael@0: michael@0: NS_IMETHOD Init(nsIWidget* aWidget, michael@0: nsIPrintSettings* aPS, michael@0: bool aIsPrintPreview); michael@0: NS_IMETHOD BeginDocument(const nsAString& aTitle, michael@0: char16_t* aPrintToFileName, michael@0: int32_t aStartPage, michael@0: int32_t aEndPage); michael@0: NS_IMETHOD EndDocument(); michael@0: NS_IMETHOD BeginPage() { return NS_OK; } michael@0: NS_IMETHOD EndPage() { return NS_OK; } michael@0: michael@0: NS_IMETHOD GetPath (const char** aPath); michael@0: michael@0: protected: michael@0: nsCOMPtr mPrintSettings; michael@0: bool mToPrinter : 1; /* If true, print to printer */ michael@0: bool mIsPPreview : 1; /* If true, is print preview */ michael@0: char mPath[PATH_MAX]; /* If toPrinter = false, dest file */ michael@0: char mPrinter[256]; /* Printer name */ michael@0: nsCString mSpoolName; michael@0: nsCOMPtr mSpoolFile; michael@0: }; michael@0: michael@0: class nsPrinterEnumeratorQt : public nsIPrinterEnumerator michael@0: { michael@0: public: michael@0: nsPrinterEnumeratorQt(); michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIPRINTERENUMERATOR michael@0: }; michael@0: michael@0: #endif /* !nsDeviceContextSpecQt_h___ */