michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 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: #ifndef nsIDeviceContextSpec_h___ michael@0: #define nsIDeviceContextSpec_h___ michael@0: michael@0: #include "nsISupports.h" michael@0: michael@0: class nsIWidget; michael@0: class nsIPrintSettings; michael@0: class gfxASurface; michael@0: michael@0: #define NS_IDEVICE_CONTEXT_SPEC_IID \ michael@0: { 0xb5548fb1, 0xf43e, 0x4921, \ michael@0: { 0x82, 0x19, 0xc3, 0x82, 0x06, 0xee, 0x74, 0x5c } } michael@0: michael@0: class nsIDeviceContextSpec : public nsISupports michael@0: { michael@0: public: michael@0: NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDEVICE_CONTEXT_SPEC_IID) michael@0: michael@0: /** michael@0: * Initialize the device context spec. michael@0: * @param aWidget A widget a dialog can be hosted in michael@0: * @param aPrintSettings Print settings for the print operation michael@0: * @param aIsPrintPreview True if creating Spec for PrintPreview michael@0: * @return NS_OK or a suitable error code. michael@0: */ michael@0: NS_IMETHOD Init(nsIWidget *aWidget, michael@0: nsIPrintSettings* aPrintSettings, michael@0: bool aIsPrintPreview) = 0; michael@0: michael@0: NS_IMETHOD GetSurfaceForPrinter(gfxASurface **nativeSurface) = 0; michael@0: michael@0: NS_IMETHOD BeginDocument(const nsAString& aTitle, michael@0: char16_t* aPrintToFileName, michael@0: int32_t aStartPage, michael@0: int32_t aEndPage) = 0; michael@0: michael@0: NS_IMETHOD EndDocument() = 0; michael@0: NS_IMETHOD BeginPage() = 0; michael@0: NS_IMETHOD EndPage() = 0; michael@0: }; michael@0: michael@0: NS_DEFINE_STATIC_IID_ACCESSOR(nsIDeviceContextSpec, michael@0: NS_IDEVICE_CONTEXT_SPEC_IID) michael@0: #endif