2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 04:12:37 -07: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-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#ifndef nsDeviceContextSpecX_h_
|
|
|
|
#define nsDeviceContextSpecX_h_
|
|
|
|
|
|
|
|
#include "nsIDeviceContextSpec.h"
|
|
|
|
|
2009-10-08 22:20:37 -07:00
|
|
|
#include <ApplicationServices/ApplicationServices.h>
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
class nsDeviceContextSpecX : public nsIDeviceContextSpec
|
|
|
|
{
|
|
|
|
public:
|
2009-10-08 22:20:37 -07:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
nsDeviceContextSpecX();
|
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
NS_IMETHOD Init(nsIWidget *aWidget, nsIPrintSettings* aPS, bool aIsPrintPreview);
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_IMETHOD GetSurfaceForPrinter(gfxASurface **surface);
|
|
|
|
NS_IMETHOD BeginDocument(PRUnichar* aTitle,
|
|
|
|
PRUnichar* aPrintToFileName,
|
2012-08-22 08:56:38 -07:00
|
|
|
int32_t aStartPage,
|
|
|
|
int32_t aEndPage);
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_IMETHOD EndDocument();
|
|
|
|
NS_IMETHOD BeginPage();
|
|
|
|
NS_IMETHOD EndPage();
|
|
|
|
|
2008-03-19 13:51:42 -07:00
|
|
|
void GetPaperRect(double* aTop, double* aLeft, double* aBottom, double* aRight);
|
2007-09-19 15:26:45 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
protected:
|
2009-10-08 22:20:37 -07:00
|
|
|
virtual ~nsDeviceContextSpecX();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
protected:
|
|
|
|
PMPrintSession mPrintSession; // printing context.
|
|
|
|
PMPageFormat mPageFormat; // page format.
|
|
|
|
PMPrintSettings mPrintSettings; // print settings.
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif //nsDeviceContextSpecX_h_
|