2007-01-27 07:06:59 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-01-12 00:54:29 +03:00
|
|
|
|
2007-01-18 09:34:07 +03:00
|
|
|
#ifndef nsDeviceContextSpecX_h_
|
|
|
|
#define nsDeviceContextSpecX_h_
|
2007-01-12 00:54:29 +03:00
|
|
|
|
|
|
|
#include "nsIDeviceContextSpec.h"
|
|
|
|
|
2009-10-09 09:20:37 +04:00
|
|
|
#include <ApplicationServices/ApplicationServices.h>
|
2007-01-12 00:54:29 +03:00
|
|
|
|
|
|
|
class nsDeviceContextSpecX : public nsIDeviceContextSpec
|
|
|
|
{
|
|
|
|
public:
|
2009-10-09 09:20:37 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
2007-01-12 00:54:29 +03:00
|
|
|
nsDeviceContextSpecX();
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD Init(nsIWidget *aWidget, nsIPrintSettings* aPS, bool aIsPrintPreview) override;
|
|
|
|
NS_IMETHOD GetSurfaceForPrinter(gfxASurface **surface) override;
|
2013-07-24 15:48:37 +04:00
|
|
|
NS_IMETHOD BeginDocument(const nsAString& aTitle,
|
2016-01-05 13:08:57 +03:00
|
|
|
const nsAString& aPrintToFileName,
|
2013-07-24 15:48:37 +04:00
|
|
|
int32_t aStartPage,
|
2015-03-21 19:28:04 +03:00
|
|
|
int32_t aEndPage) override;
|
|
|
|
NS_IMETHOD EndDocument() override;
|
|
|
|
NS_IMETHOD BeginPage() override;
|
|
|
|
NS_IMETHOD EndPage() override;
|
2007-01-12 00:54:29 +03:00
|
|
|
|
2008-03-19 23:51:42 +03:00
|
|
|
void GetPaperRect(double* aTop, double* aLeft, double* aBottom, double* aRight);
|
2007-09-20 02:26:45 +04:00
|
|
|
|
2007-01-12 00:54:29 +03:00
|
|
|
protected:
|
2009-10-09 09:20:37 +04:00
|
|
|
virtual ~nsDeviceContextSpecX();
|
2007-01-12 00:54:29 +03:00
|
|
|
|
|
|
|
protected:
|
|
|
|
PMPrintSession mPrintSession; // printing context.
|
|
|
|
PMPageFormat mPageFormat; // page format.
|
|
|
|
PMPrintSettings mPrintSettings; // print settings.
|
|
|
|
};
|
|
|
|
|
2007-01-27 07:06:59 +03:00
|
|
|
#endif //nsDeviceContextSpecX_h_
|