From 47d455dd55be855e4cc691c32f687f723d9247ee Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kfile-plugins/pcx/kfile_pcx.h | 88 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 kfile-plugins/pcx/kfile_pcx.h (limited to 'kfile-plugins/pcx/kfile_pcx.h') diff --git a/kfile-plugins/pcx/kfile_pcx.h b/kfile-plugins/pcx/kfile_pcx.h new file mode 100644 index 00000000..434f89a3 --- /dev/null +++ b/kfile-plugins/pcx/kfile_pcx.h @@ -0,0 +1,88 @@ +/* This file is part of the KDE project + * Copyright (C) 2002 Nadeem Hasan + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation version 2. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + */ + +#ifndef __KFILE_PCX_H_ +#define __KFILE_PCX_H_ + +#include + +struct PALETTE +{ + struct + { + Q_UINT8 r; + Q_UINT8 g; + Q_UINT8 b; + } p[ 16 ]; +}; + +struct PCXHEADER +{ + Q_UINT8 Manufacturer; // Constant Flag, 10 = ZSoft .pcx + Q_UINT8 Version; // Version informationˇ + // 0 = Version 2.5 of PC Paintbrushˇ + // 2 = Version 2.8 w/palette informationˇ + // 3 = Version 2.8 w/o palette informationˇ + // 4 = PC Paintbrush for Windows(Plus for + // Windows uses Ver 5)ˇ + // 5 = Version 3.0 and > of PC Paintbrush + // and PC Paintbrush +, includes + // Publisher's Paintbrush . Includes + // 24-bit .PCX filesˇ + Q_UINT8 Encoding; // 1 = .PCX run length encoding + Q_UINT8 Bpp; // Number of bits to represent a pixel + // (per Plane) - 1, 2, 4, or 8ˇ + Q_UINT16 XMin; + Q_UINT16 YMin; + Q_UINT16 XMax; + Q_UINT16 YMax; + Q_UINT16 HDpi; + Q_UINT16 YDpi; + struct PALETTE Palette; + Q_UINT8 Reserved; // Should be set to 0. + Q_UINT8 NPlanes; // Number of color planes + Q_UINT16 BytesPerLine; // Number of bytes to allocate for a scanline + // plane. MUST be an EVEN number. Do NOT + // calculate from Xmax-Xmin.ˇ + Q_UINT16 PaletteInfo; // How to interpret palette- 1 = Color/BW, + // 2 = Grayscale ( ignored in PB IV/ IV + )ˇ + Q_UINT16 HScreenSize; // Horizontal screen size in pixels. New field + // found only in PB IV/IV Plus + Q_UINT16 VScreenSize; // Vertical screen size in pixels. New field + // found only in PB IV/IV Plus + Q_UINT8 Filler[ 54 ]; // Blank to fill out 128 byte header. Set all + // bytes to 0 +}; + +class KPcxPlugin: public KFilePlugin +{ + Q_OBJECT + +public: + KPcxPlugin(QObject *parent, const char *name, const QStringList& args); + virtual bool readInfo(KFileMetaInfo& info, uint what); + +private: +}; + +#endif + +/* vim: et sw=2 ts=2 +*/ + -- cgit v1.2.1