home *** CD-ROM | disk | FTP | other *** search
/ ftp.infoflex.se / 2015-02-10.ftp.infoflex.se.tar / ftp.infoflex.se / pub / xfax / ghostscript / gdevxfax.h < prev    next >
C/C++ Source or Header  |  2001-06-03  |  2KB  |  108 lines

  1. /*
  2.  * gdevxfax.h
  3.  * By Nordic Messaging Tech. AB, Sweden, 2001.
  4.  * Hopefully you find this XFAX driver for Ghostscript
  5.  * useful. However, with provide it WITHOUT ANY
  6.  * WARRANTY. You use it at YOUR OWN RISK.
  7.  * Visit us at http://www.nordicmessaging.se or send
  8.  * e-mail at info@nordicmessaging.se.
  9.  *
  10.  * We are helpful but do NOT guarantee support for
  11.  * this Ghostscript driver.
  12.  */
  13.  
  14. #define USHORT    unsigned short
  15. #define UCHAR    unsigned char
  16.  
  17. typedef struct {
  18.     int startx, starty;
  19.     short endx, endy;
  20.     short depth, width;
  21.     short pixel_width;
  22.     short pixel_depth;
  23.     short xsize, ysize;
  24.     int resolution;
  25.     int inx;
  26.     int id;
  27.  
  28.     UCHAR **data;
  29. } IMAGE;
  30.  
  31. typedef struct
  32. {
  33.     FILE        *fp;
  34.     int        fax_byte;
  35.     int        fax_weight;
  36.     int        pages;
  37. } FAXOUT;
  38.  
  39. typedef enum {
  40.     BT_TEXT, BT_IMAGE, BT_SHADING
  41. } block_type;
  42.  
  43. typedef struct Block BLOCK;
  44.  
  45. struct Block {
  46.     block_type type;        /* Type of block:
  47.                     0 Text[
  48.                     1 Raster image
  49.                     2 Shading
  50.                 */
  51.     short startx, starty;
  52.     short endx, endy;
  53.     unsigned short attr;
  54.     int para;
  55.     int baseline;
  56.     unsigned short font;
  57.     unsigned short data_length;
  58.     UCHAR *data;
  59.     unsigned short *font_block;
  60.     short pattern;
  61.  
  62.     BLOCK *prev;    /* Pointer to previous block */
  63.     BLOCK *next;    /* Pointer to next block */
  64. };
  65. extern BLOCK *first_block;
  66.  
  67. typedef struct Environment ENV;
  68.  
  69. typedef struct page_struct {
  70.     short resolution;
  71.     short underline;
  72.     short orientation;
  73.     short margins[4];
  74.     short curpos[2];
  75.     short spacing[2];
  76.     short offset[2];
  77.     int end;
  78.     short minx, miny;
  79.     short maxx, maxy;
  80.  
  81.     int doing_image;
  82.  
  83.     BLOCK *next_para_block;
  84.     short space_width;
  85.  
  86.     int fax_page_width;
  87.     int fax_page_depth;
  88.     int macro_id;
  89.     int pending_run;
  90.     int fdout;
  91.     int xdiv, ydiv, xdisp, ydisp;
  92.     int line_termination_mode;
  93.     short length;
  94.     unsigned short longest_page;
  95.     short symbol_set;
  96.     short map_number;
  97.     short pattern;
  98.     short pattern_id;
  99.     short rule_size[2];
  100.     short y_scale;
  101.  
  102.     IMAGE *curImage;
  103.  
  104.     BLOCK *firstBlock, *curBlock;
  105. } PAGE;
  106.  
  107. #define FAX_WIDTH    1728
  108.