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();
|
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
NS_IMETHOD Init(nsIWidget *aWidget, nsIPrintSettings* aPS, bool aIsPrintPreview);
|
2007-01-12 00:54:29 +03:00
|
|
|
NS_IMETHOD GetSurfaceForPrinter(gfxASurface **surface);
|
|
|
|
NS_IMETHOD BeginDocument(PRUnichar* aTitle,
|
|
|
|
PRUnichar* aPrintToFileName,
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t aStartPage,
|
|
|
|
int32_t aEndPage);
|
2007-01-27 07:06:59 +03:00
|
|
|
NS_IMETHOD EndDocument();
|
|
|
|
NS_IMETHOD BeginPage();
|
|
|
|
NS_IMETHOD EndPage();
|
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_
|