widget/nsIDeviceContextSpec.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #ifndef nsIDeviceContextSpec_h___
michael@0 7 #define nsIDeviceContextSpec_h___
michael@0 8
michael@0 9 #include "nsISupports.h"
michael@0 10
michael@0 11 class nsIWidget;
michael@0 12 class nsIPrintSettings;
michael@0 13 class gfxASurface;
michael@0 14
michael@0 15 #define NS_IDEVICE_CONTEXT_SPEC_IID \
michael@0 16 { 0xb5548fb1, 0xf43e, 0x4921, \
michael@0 17 { 0x82, 0x19, 0xc3, 0x82, 0x06, 0xee, 0x74, 0x5c } }
michael@0 18
michael@0 19 class nsIDeviceContextSpec : public nsISupports
michael@0 20 {
michael@0 21 public:
michael@0 22 NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDEVICE_CONTEXT_SPEC_IID)
michael@0 23
michael@0 24 /**
michael@0 25 * Initialize the device context spec.
michael@0 26 * @param aWidget A widget a dialog can be hosted in
michael@0 27 * @param aPrintSettings Print settings for the print operation
michael@0 28 * @param aIsPrintPreview True if creating Spec for PrintPreview
michael@0 29 * @return NS_OK or a suitable error code.
michael@0 30 */
michael@0 31 NS_IMETHOD Init(nsIWidget *aWidget,
michael@0 32 nsIPrintSettings* aPrintSettings,
michael@0 33 bool aIsPrintPreview) = 0;
michael@0 34
michael@0 35 NS_IMETHOD GetSurfaceForPrinter(gfxASurface **nativeSurface) = 0;
michael@0 36
michael@0 37 NS_IMETHOD BeginDocument(const nsAString& aTitle,
michael@0 38 char16_t* aPrintToFileName,
michael@0 39 int32_t aStartPage,
michael@0 40 int32_t aEndPage) = 0;
michael@0 41
michael@0 42 NS_IMETHOD EndDocument() = 0;
michael@0 43 NS_IMETHOD BeginPage() = 0;
michael@0 44 NS_IMETHOD EndPage() = 0;
michael@0 45 };
michael@0 46
michael@0 47 NS_DEFINE_STATIC_IID_ACCESSOR(nsIDeviceContextSpec,
michael@0 48 NS_IDEVICE_CONTEXT_SPEC_IID)
michael@0 49 #endif

mercurial