widget/qt/nsDeviceContextSpecQt.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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
    19 {
    20 public:
    21     nsDeviceContextSpecQt();
    22     virtual ~nsDeviceContextSpecQt();
    24     NS_DECL_ISUPPORTS
    26     NS_IMETHOD GetSurfaceForPrinter(gfxASurface** surface);
    28     NS_IMETHOD Init(nsIWidget* aWidget,
    29                     nsIPrintSettings* aPS,
    30                     bool aIsPrintPreview);
    31     NS_IMETHOD BeginDocument(const nsAString& aTitle,
    32                              char16_t* aPrintToFileName,
    33                              int32_t aStartPage,
    34                              int32_t aEndPage);
    35     NS_IMETHOD EndDocument();
    36     NS_IMETHOD BeginPage() { return NS_OK; }
    37     NS_IMETHOD EndPage() { return NS_OK; }
    39     NS_IMETHOD GetPath (const char** aPath);
    41 protected:
    42     nsCOMPtr<nsIPrintSettings> mPrintSettings;
    43     bool mToPrinter : 1;      /* If true, print to printer */
    44     bool mIsPPreview : 1;     /* If true, is print preview */
    45     char   mPath[PATH_MAX];     /* If toPrinter = false, dest file */
    46     char   mPrinter[256];       /* Printer name */
    47     nsCString         mSpoolName;
    48     nsCOMPtr<nsIFile> mSpoolFile;
    49 };
    51 class nsPrinterEnumeratorQt : public nsIPrinterEnumerator
    52 {
    53 public:
    54     nsPrinterEnumeratorQt();
    55     NS_DECL_ISUPPORTS
    56     NS_DECL_NSIPRINTERENUMERATOR
    57 };
    59 #endif /* !nsDeviceContextSpecQt_h___ */

mercurial