2007-09-06 22:41:04 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
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-09-06 22:41:04 +04:00
|
|
|
|
|
|
|
#ifndef nsPrintOS2_h___
|
|
|
|
#define nsPrintOS2_h___
|
|
|
|
|
|
|
|
#define INCL_PM
|
|
|
|
#define INCL_DOS
|
|
|
|
#define INCL_DOSERRORS
|
|
|
|
#define INCL_SPLDOSPRINT
|
|
|
|
#define INCL_DEV
|
|
|
|
#define INCL_DEVDJP
|
|
|
|
#define INCL_GRE_DEVICE
|
|
|
|
#include <os2.h>
|
|
|
|
#include <pmddim.h>
|
2007-09-06 22:41:03 +04:00
|
|
|
#include "gfxCore.h"
|
2007-09-06 22:41:04 +04:00
|
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
// OS/2 Printing - was in libprint
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
// Library init and term; job properties per queue are cached during run.
|
2007-09-09 13:07:20 +04:00
|
|
|
BOOL PrnInitialize(HMODULE hmodResources);
|
|
|
|
BOOL PrnTerminate(void);
|
2007-09-06 22:41:04 +04:00
|
|
|
|
|
|
|
// opaque type to describe a print queue (printer)
|
2007-09-09 13:07:20 +04:00
|
|
|
class PRTQUEUE;
|
2007-09-06 22:41:04 +04:00
|
|
|
|
|
|
|
#define MAX_PRINT_QUEUES (128)
|
|
|
|
|
2007-09-09 13:07:20 +04:00
|
|
|
class PRINTDLG
|
2007-09-06 22:41:04 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
PRINTDLG();
|
|
|
|
~PRINTDLG();
|
|
|
|
void RefreshPrintQueue();
|
|
|
|
ULONG GetNumPrinters();
|
|
|
|
void GetPrinter(ULONG printerNdx, char** printerName);
|
|
|
|
PRTQUEUE* SetPrinterQueue(ULONG printerNdx);
|
|
|
|
LONG GetPrintDriverSize(ULONG printerNdx);
|
|
|
|
PDRIVDATA GetPrintDriver(ULONG printerNdx);
|
|
|
|
HDC GetDCHandle(ULONG printerNdx);
|
|
|
|
char* GetDriverType(ULONG printerNdx);
|
|
|
|
BOOL ShowProperties(ULONG printerNdx);
|
|
|
|
|
|
|
|
private:
|
|
|
|
ULONG mQueueCount;
|
|
|
|
PRTQUEUE* mPQBuf[MAX_PRINT_QUEUES];
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Release app. resources associated with a printer
|
2007-09-09 13:07:20 +04:00
|
|
|
BOOL PrnClosePrinter( PRTQUEUE *pPrintQueue);
|
2007-09-06 22:41:04 +04:00
|
|
|
|
|
|
|
// Get a DC for the selected printer. Must supply the application name.
|
2009-11-04 00:29:31 +03:00
|
|
|
HDC PrnOpenDC( PRTQUEUE *pPrintQueue, PCSZ pszApplicationName, int copies, int destination, char *file);
|
2007-09-06 22:41:04 +04:00
|
|
|
|
|
|
|
// Get the hardcopy caps for the selected form
|
2007-09-09 13:07:20 +04:00
|
|
|
BOOL PrnQueryHardcopyCaps( HDC hdc, PHCINFO pHCInfo);
|
2007-09-06 22:41:04 +04:00
|
|
|
|
|
|
|
#endif
|