1 /* 2 * "$Id: printdef.h,v 1.5 2001/03/31 20:56:53 rlk Exp $" 3 * 4 * I18N header file for the gimp-print plugin. 5 * 6 * Copyright 1997-2000 Michael Sweet (mike@easysw.com), 7 * Robert Krawitz (rlk@alum.mit.edu) and Michael Natterer (mitch@gimp.org) 8 * 9 * This program is free software; you can redistribute it and/or modify it 10 * under the terms of the GNU General Public License as published by the Free 11 * Software Foundation; either version 2 of the License, or (at your option) 12 * any later version. 13 * 14 * This program is distributed in the hope that it will be useful, but 15 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 16 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 17 * for more details. 18 * 19 * You should have received a copy of the GNU General Public License 20 * along with this program; if not, write to the Free Software 21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 22 */ 23 24 #define OUTPUT_GRAY 0 /* Grayscale output */ 25 #define OUTPUT_COLOR 1 /* Color output */ 26 #define OUTPUT_GRAY_COLOR 2 /* Grayscale output using color */ 27 28 #define ORIENT_AUTO -1 /* Best orientation */ 29 #define ORIENT_PORTRAIT 0 /* Portrait orientation */ 30 #define ORIENT_LANDSCAPE 1 /* Landscape orientation */ 31 #define ORIENT_UPSIDEDOWN 2 /* Reverse portrait orientation */ 32 #define ORIENT_SEASCAPE 3 /* Reverse landscape orientation */ 33 34 #define IMAGE_LINE_ART 0 35 #define IMAGE_SOLID_TONE 1 36 #define IMAGE_CONTINUOUS 2 37 #define IMAGE_MONOCHROME 3 38 #define NIMAGE_TYPES 4 39 40 #define COLOR_MODEL_RGB 0 41 #define COLOR_MODEL_CMY 1 42 43 typedef struct /* Plug-in variables */ 44 { 45 char output_to[256], /* Name of file or command to print to */ 46 driver[64], /* Name of printer "driver" */ 47 ppd_file[256], /* PPD file */ 48 resolution[64], /* Resolution */ 49 media_size[64], /* Media size */ 50 media_type[64], /* Media type */ 51 media_source[64], /* Media source */ 52 ink_type[64], /* Ink or cartridge */ 53 dither_algorithm[64]; /* Dithering algorithm */ 54 int output_type; /* Color or grayscale output */ 55 float brightness; /* Output brightness */ 56 float scaling; /* Scaling, percent of printable area */ 57 int orientation, /* Orientation - 0 = port., 1 = land., 58 -1 = auto */ 59 left, /* Offset from lower-lefthand corner, points */ 60 top; /* ... */ 61 float gamma; /* Gamma */ 62 float contrast, /* Output Contrast */ 63 cyan, /* Output red level */ 64 magenta, /* Output green level */ 65 yellow; /* Output blue level */ 66 float saturation; /* Output saturation */ 67 float density; /* Maximum output density */ 68 int image_type; /* Image type (line art etc.) */ 69 int unit; /* Units for preview area 0=Inch 1=Metric */ 70 float app_gamma; /* Application gamma */ 71 int page_width; /* Width of page in points */ 72 int page_height; /* Height of page in points */ 73 int input_color_model; /* Color model for this device */ 74 int output_color_model; /* Color model for this device */ 75 void *lut; /* Look-up table */ 76 void *driver_data; /* Private data of the driver */ 77 unsigned char *cmap; /* Color map */ 78 void (*outfunc)(void *data, const char *buffer, size_t bytes); 79 void *outdata; 80 void (*errfunc)(void *data, const char *buffer, size_t bytes); 81 void *errdata; 82 } stp_vars_t; 83 84 typedef struct stp_printer 85 { 86 const char *long_name, /* Long name for UI */ 87 *driver; /* Short name for printrc file */ 88 int model; /* Model number */ 89 const char *printfuncs; 90 stp_vars_t printvars; 91 } stp_printer_t; 92 93 typedef union yylv { 94 int ival; 95 double dval; 96 char *sval; 97 } YYSTYPE; 98 99 extern YYSTYPE yylval; 100 extern stp_printer_t thePrinter; 101 102 #include "printdefy.h" 103 104