xref: /haiku/src/add-ons/print/drivers/pcl6/PCL6.h (revision 06b932a49d65e82cdfa7d28a04f48eef6de9ea49)
1 /*
2  * PCL5.h
3  * Copyright 1999-2000 Y.Takagi. All Rights Reserved.
4  */
5 
6 #ifndef __PCL6_H
7 #define __PCL6_H
8 
9 #include "GraphicsDriver.h"
10 #include "jetlib.h"
11 
12 class Halftone;
13 
14 class PCL6Driver : public GraphicsDriver, private MJetlibClient {
15 public:
16 	PCL6Driver(BMessage *msg, PrinterData *printer_data, const PrinterCap *printer_cap);
17 
18     virtual void FlushOutBuffer(HP_StreamHandleType pStream,
19                                 unsigned long cookie,
20                                 HP_pUByte pOutBuffer,
21                                 HP_SInt32 currentBufferLen);
22 
23 protected:
24 	virtual bool startDoc();
25 	virtual bool startPage(int page);
26 	virtual bool nextBand(BBitmap *bitmap, BPoint *offset);
27 	virtual bool endPage(int page);
28 	virtual bool endDoc(bool success);
29 
30 private:
31 	HP_UByte mediaSize(JobData::PAPER paper);
32 	void move(int x, int y);
33 	void jobStart();
34 	void startRasterGraphics(int x, int y, int width, int height);
35 	void endRasterGraphics();
36 	void rasterGraphics(
37 		int compression_method,
38 		const uchar *buffer,
39 		int size);
40 	void jobEnd();
41 
42 	HP_StreamHandleType __stream;
43 	int __compression_method;
44 	Halftone *__halftone;
45 };
46 
47 #endif	/* __PCL5_H */
48