Bug 959171 - Fix how to bind EGLImage in GrallocTextureHostOGL. r=nical
[gecko.git] / widget / os2 / nsDeviceContextSpecOS2.h
blob3629754a6232b98479b976c4766c6d80b6e79af5
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
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/. */
6 #ifndef nsDeviceContextSpecOS2_h___
7 #define nsDeviceContextSpecOS2_h___
9 #define INCL_PM
10 #define INCL_DOS
11 #define INCL_DOSERRORS
12 #define INCL_SPLDOSPRINT
13 #define INCL_DEV
14 #define INCL_DEVDJP
15 #define INCL_GRE_DEVICE
17 #include "nsCOMPtr.h"
18 #include "nsIDeviceContextSpec.h"
19 #include "nsIPrintOptions.h"
20 #include "nsIPrintSettings.h"
21 #include "nsPrintdOS2.h"
22 #include <os2.h>
23 #include <pmddim.h>
25 #include "nsPrintOS2.h"
26 //---------------------------------------------------------------------
27 // nsDeviceContextSpecOS2
28 //---------------------------------------------------------------------
30 class nsDeviceContextSpecOS2 : public nsIDeviceContextSpec
32 public:
33 /**
34 * Construct a nsDeviceContextSpecOS2, which is an object which contains and manages a mac printrecord
35 * @update dc 12/02/98
37 nsDeviceContextSpecOS2();
39 NS_DECL_ISUPPORTS
41 /**
42 * Initialize the nsDeviceContextSpecOS2 for use. This will allocate a printrecord for use
43 * @update dc 2/16/98
44 * @param aWidget Unused
45 * @param aPS Settings for this print job
46 * @param aIsPrintPreview if true, creating Spec for PrintPreview
47 * @return error status
49 NS_IMETHOD Init(nsIWidget *aWidget, nsIPrintSettings* aPS, bool aIsPrintPreview);
51 NS_IMETHOD ClosePrintManager();
53 NS_IMETHOD GetDestination ( int &aDestination );
55 NS_IMETHOD GetPrinterName ( char **aPrinter );
57 NS_IMETHOD GetCopies ( int &aCopies );
59 NS_IMETHOD GetPath ( char **aPath );
61 NS_IMETHOD GetUserCancelled( bool &aCancel );
63 NS_IMETHOD GetPRTQUEUE(PRTQUEUE *&p);
65 NS_IMETHOD GetSurfaceForPrinter(gfxASurface **nativeSurface);
66 NS_IMETHOD BeginDocument(const nsAString& aTitle, char16_t* aPrintToFileName,
67 int32_t aStartPage, int32_t aEndPage);
68 NS_IMETHOD EndDocument();
69 NS_IMETHOD BeginPage();
70 NS_IMETHOD EndPage();
72 /**
73 * Destructor for nsDeviceContextSpecOS2, this will release the printrecord
74 * @update dc 2/16/98
76 virtual ~nsDeviceContextSpecOS2();
78 static PRINTDLG PrnDlg;
79 static nsresult SetPrintSettingsFromDevMode(nsIPrintSettings* aPrintSettings, ULONG printer);
81 protected:
82 OS2PrData mPrData;
83 PRTQUEUE *mQueue;
84 nsCOMPtr<nsIPrintSettings> mPrintSettings;
85 HDC mPrintDC;
86 bool mPrintingStarted;
89 //-------------------------------------------------------------------------
90 // Printer Enumerator
91 //-------------------------------------------------------------------------
92 class nsPrinterEnumeratorOS2 : public nsIPrinterEnumerator
94 public:
95 nsPrinterEnumeratorOS2();
96 NS_DECL_ISUPPORTS
97 NS_DECL_NSIPRINTERENUMERATOR
99 protected:
103 #endif