xref: /haiku/src/add-ons/translators/pcx/PCXTranslator.h (revision 893988af824e65e49e55f517b157db8386e8002b)
1 /*
2  * Copyright 2008, Jérôme Duval, korli@users.berlios.de. All rights reserved.
3  * Copyright 2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
4  * Distributed under the terms of the MIT License.
5  */
6 #ifndef PCX_TRANSLATOR_H
7 #define PCX_TRANSLATOR_H
8 
9 
10 #include "BaseTranslator.h"
11 
12 #include <Translator.h>
13 #include <TranslatorFormats.h>
14 #include <TranslationDefs.h>
15 #include <GraphicsDefs.h>
16 #include <InterfaceDefs.h>
17 #include <DataIO.h>
18 #include <File.h>
19 #include <ByteOrder.h>
20 
21 
22 #define PCX_TRANSLATOR_VERSION B_TRANSLATION_MAKE_VERSION(0, 3, 0)
23 #define PCX_IMAGE_FORMAT	'PCX '
24 
25 #define PCX_IN_QUALITY		0.5
26 #define PCX_IN_CAPABILITY	0.5
27 #define BITS_IN_QUALITY		1
28 #define BITS_IN_CAPABILITY	1
29 
30 #define PCX_OUT_QUALITY		0.8
31 #define PCX_OUT_CAPABILITY	0.8
32 #define BITS_OUT_QUALITY	1
33 #define BITS_OUT_CAPABILITY	0.9
34 
35 
36 class PCXTranslator : public BaseTranslator {
37 	public:
38 		PCXTranslator();
39 
40 		virtual status_t DerivedIdentify(BPositionIO *inSource,
41 			const translation_format *inFormat, BMessage *ioExtension,
42 			translator_info *outInfo, uint32 outType);
43 
44 		virtual status_t DerivedTranslate(BPositionIO *inSource,
45 			const translator_info *inInfo, BMessage *ioExtension,
46 			uint32 outType, BPositionIO *outDestination, int32 baseType);
47 
48 		virtual BView *NewConfigView(TranslatorSettings *settings);
49 
50 	protected:
51 		virtual ~PCXTranslator();
52 			// this is protected because the object is deleted by the
53 			// Release() function instead of being deleted directly by
54 			// the user
55 
56 	private:
57 };
58 
59 #endif	/* PCX_TRANSLATOR_H */
60