"Fossies" - the Fresh Open Source Software Archive

Member "hp2xx-3.4.4/sources/pendef.h" (21 Jun 2003, 1918 Bytes) of package /linux/misc/old/hp2xx-3.4.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "pendef.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2    Copyright (c) 2001-2002 Andrew Bird  All rights reserved.
    3    Distributed by Free Software Foundation, Inc.
    4 
    5 This file is part of HP2xx.
    6 
    7 HP2xx is distributed in the hope that it will be useful, but
    8 WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
    9 to anyone for the consequences of using it or for whether it serves any
   10 particular purpose or works at all, unless he says so in writing.  Refer
   11 to the GNU General Public License, Version 2 or later, for full details.
   12 
   13 Everyone is granted permission to copy, modify and redistribute
   14 HP2xx, but only under the conditions described in the GNU General Public
   15 License.  A copy of this license is supposed to have been
   16 given to you along with HP2xx so you can know your rights and
   17 responsibilities.  It should be in a file named COPYING.  Among other
   18 things, the copyright notice and this notice must be preserved on all
   19 copies.
   20 
   21 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   22 */
   23 
   24 #ifndef __PENDEF_H
   25 #define __PENDEF_H
   26 
   27 #define NUMPENS 256
   28 
   29 /**
   30  ** Color codes used within hp2xx
   31  **/
   32 
   33 #define xxBackground    0
   34 #define xxForeground    1
   35 #define xxRed           2
   36 #define xxGreen         3
   37 #define xxBlue          4
   38 #define xxCyan          5
   39 #define xxMagenta       6
   40 #define xxYellow        7
   41 
   42 
   43 typedef unsigned short int PEN_N;
   44 typedef unsigned short int PEN_C;
   45 typedef float PEN_W;
   46 typedef unsigned char BYTE;
   47 typedef struct {
   48    PEN_W width[NUMPENS+1];      /* -p xxxxxxxx / PW             */
   49    PEN_C color[NUMPENS+1];      /* -c xxxxxxxx / PC             */
   50    BYTE  clut[NUMPENS+9][3];    /* color lookup table           */
   51 } PEN;
   52 
   53 extern PEN pt;
   54 
   55 void set_color_rgb(PEN_N index,BYTE r,BYTE g, BYTE b);
   56 void Pen_Width_to_tmpfile (int pen, PEN_W width);
   57 void Pen_Color_to_tmpfile (int pen, int red, int green, int blue);
   58 int load_pen_width_table(FILE *td);
   59 int load_pen_color_table(FILE *td);
   60 
   61 #endif /* __PENDEF_H */