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