home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 502b.lha / PCQ_v1.2 / Include / Intuition / Preferences.i < prev    next >
Text File  |  1991-05-07  |  8KB  |  260 lines

  1. {
  2.     Preferences.i for PCQ Pascal
  3. }
  4.  
  5. {$I "Include:Devices/Timer.i"}
  6.  
  7. { ======================================================================== }
  8. { === Preferences ======================================================== }
  9. { ======================================================================== }
  10.  
  11. Const
  12.  
  13. { these are the definitions for the printer configurations }
  14.     FILENAME_SIZE    = 30;        { Filename size }
  15.  
  16.     POINTERSIZE        = (1 + 16 + 1) * 2;    { Size of Pointer data buffer }
  17.  
  18. { These defines are for the default font size.     These actually describe the
  19.  * height of the defaults fonts.  The default font type is the topaz
  20.  * font, which is a fixed width font that can be used in either 
  21.  * eighty-column or sixty-column mode.    The Preferences structure reflects
  22.  * which is currently selected by the value found in the variable FontSize,
  23.  * which may have either of the values defined below.  These values actually
  24.  * are used to select the height of the default font.  By changing the
  25.  * height, the resolution of the font changes as well.
  26.  }
  27.     TOPAZ_EIGHTY    = 8;
  28.     TOPAZ_SIXTY     = 9;
  29.  
  30. Type
  31.  
  32.     Preferences = record
  33.     { the default font height }
  34.     FontHeight    : Byte;        { height for system default font  }
  35.  
  36.     { constant describing what's hooked up to the port }
  37.     PrinterPort    : Byte;        { printer port connection     }
  38.  
  39.     { the baud rate of the port }
  40.     BaudRate    : Short;    { baud rate for the serial port   }
  41.     
  42.     { various timing rates }
  43.     KeyRptSpeed    : timeval;    { repeat speed for keyboard       }
  44.     KeyRptDelay    : timeval;    { Delay before keys repeat           }
  45.     DoubleClick    : timeval;    { Interval allowed between clicks }
  46.  
  47.     { Intuition Pointer data }
  48.     PointerMatrix    : Array [0..POINTERSIZE-1] of Short;
  49.                     { Definition of pointer sprite       }
  50.     XOffset        : Byte;        { X-Offset for active 'bit'       }
  51.     YOffset        : Byte;        { Y-Offset for active 'bit'       }
  52.     color17        : Short;    {*********************************}
  53.     color18        : Short;    { Colours for sprite pointer      }
  54.     color19        : Short;    {*********************************}
  55.     PointerTicks    : Short;    { Sensitivity of the pointer       }
  56.  
  57.     { Workbench Screen colors }
  58.     color0        : Short;    {*********************************}
  59.     color1        : Short;    {   Standard default colours      }
  60.     color2        : Short;    {   Used in the Workbench         }
  61.     color3        : Short;    {*********************************}
  62.  
  63.     { positioning data for the Intuition View }
  64.     ViewXOffset    : Byte;        { Offset for top lefthand corner  }
  65.     ViewYOffset    : Byte;        { X and Y dimensions           }
  66.     ViewInitX,
  67.     ViewInitY    : Short;    { View initial offset values      }
  68.  
  69.     EnableCLI    : Boolean;    { CLI availability switch }
  70.  
  71.     { printer configurations }
  72.     PrinterType    : Short;    { printer type               }
  73.     PrinterFilename    : Array [0..FILENAME_SIZE-1] of Char;
  74.                     { file for printer       }
  75.  
  76.     { print format and quality configurations }
  77.     PrintPitch    : Short;    { print pitch           }
  78.     PrintQuality    : Short;    { print quality       }
  79.     PrintSpacing    : Short;    { number of lines per inch    }
  80.     PrintLeftMargin    : Short;    { left margin in characters       }
  81.     PrintRightMargin : Short;    { right margin in characters       }
  82.     PrintImage    : Short;    { positive or negative           }
  83.     PrintAspect    : Short;    { horizontal or vertical      }
  84.     PrintShade    : Short;    { b&w, half-tone, or color    }
  85.     PrintThreshold    : Short;    { darkness ctrl for b/w dumps       }
  86.  
  87.     { print paper descriptors }
  88.     PaperSize    : Short;    { paper size           }
  89.     PaperLength    : Short;    { paper length in number of lines }
  90.     PaperType    : Short;    { continuous or single sheet       }
  91.  
  92.     { Serial device settings: These are six nibble-fields in three bytes }
  93.     { (these look a little strange so the defaults will map out to zero) } 
  94.     SerRWBits    : Byte;
  95.                  { upper nibble = (8-number of read bits)      }
  96.                  { lower nibble = (8-number of write bits)      }
  97.     SerStopBuf    : Byte;
  98.                  { upper nibble = (number of stop bits - 1)  }
  99.                  { lower nibble = (table value for BufSize)  }
  100.     SerParShk    : Byte;
  101.                  { upper nibble = (value for Parity setting) }
  102.                  { lower nibble = (value for Handshake mode) }
  103.     LaceWB        : Byte;        { if workbench is to be interlaced      }
  104.  
  105.     WorkName    : Array [0..FILENAME_SIZE-1] of Char;
  106.                     { temp file for printer        }
  107.  
  108.     RowSizeChange    : Byte;
  109.     ColumnSizeChange : Byte;
  110.  
  111.     PrintFlags    : Short;    { user preference flags }
  112.     PrintMaxWidth    : Short;    { max width of printed picture in 10ths/inch }
  113.     PrintMaxHeight    : Short;    { max height of printed picture in 10ths/inch }
  114.     PrintDensity    : Byte;        { print density }
  115.     PrintXOffset    : Byte;        { offset of printed picture in 10ths/inch }
  116.  
  117.     wb_Width    : Short;    { override default workbench width     }
  118.     wb_Height    : Short;    { override default workbench height }
  119.     wb_Depth    : Byte;        { override default workbench depth     }
  120.  
  121.     ext_size    : Byte;        { extension information -- do not touch! }
  122.                 { extension size in blocks of 64 bytes }
  123.     end;
  124.     PreferencesPtr = ^Preferences;
  125.  
  126. Const
  127.  
  128. { Workbench Interlace (use one bit) }
  129.     LACEWB        = $01;
  130.     LW_RESERVED        = 1;     { internal use only }
  131.  
  132. { PrinterPort }
  133.     PARALLEL_PRINTER     = $00;
  134.     SERIAL_PRINTER    = $01;
  135.  
  136. { BaudRate }
  137.     BAUD_110        = $00;
  138.     BAUD_300        = $01;
  139.     BAUD_1200       = $02;
  140.     BAUD_2400       = $03;
  141.     BAUD_4800       = $04;
  142.     BAUD_9600       = $05;
  143.     BAUD_19200      = $06;
  144.     BAUD_MIDI       = $07;
  145.  
  146. { PaperType }
  147.     FANFOLD        = $00;
  148.     SINGLE        = $80;
  149.  
  150. { PrintPitch }
  151.     PICA        = $000;
  152.     ELITE        = $400;
  153.     FINE        = $800;
  154.  
  155. { PrintQuality }
  156.     DRAFT        = $000;
  157.     LETTER        = $100;
  158.  
  159. { PrintSpacing }
  160.     SIX_LPI        = $000;
  161.     EIGHT_LPI        = $200;
  162.  
  163. { Print Image }
  164.     IMAGE_POSITIVE    = $00;
  165.     IMAGE_NEGATIVE    = $01;
  166.  
  167. { PrintAspect }
  168.     ASPECT_HORIZ    = $00;
  169.     ASPECT_VERT     = $01;
  170.  
  171. { PrintShade }
  172.     SHADE_BW        = $00;
  173.     SHADE_GREYSCALE    = $01;
  174.     SHADE_COLOR        = $02;
  175.  
  176. { PaperSize }
  177.     US_LETTER        = $00;
  178.     US_LEGAL        = $10;
  179.     N_TRACTOR        = $20;
  180.     W_TRACTOR        = $30;
  181.     CUSTOM_PAPER    = $40;
  182.  
  183. { PrinterType }
  184.     CUSTOM_NAME        = $00;
  185.     ALPHA_P_101        = $01;
  186.     BROTHER_15XL    = $02;
  187.     CBM_MPS1000        = $03;
  188.     DIAB_630        = $04;
  189.     DIAB_ADV_D25    = $05;
  190.     DIAB_C_150        = $06;
  191.     EPSON        = $07;
  192.     EPSON_JX_80        = $08;
  193.     OKIMATE_20        = $09;
  194.     QUME_LP_20        = $0A;
  195. { new printer entries, 3 October 1985 }
  196.     HP_LASERJET        = $0B;
  197.     HP_LASERJET_PLUS    = $0C;
  198.  
  199. { Serial Input Buffer Sizes }
  200.     SBUF_512        = $00;
  201.     SBUF_1024        = $01;
  202.     SBUF_2048        = $02;
  203.     SBUF_4096        = $03;
  204.     SBUF_8000        = $04;
  205.     SBUF_16000        = $05;
  206.  
  207. { Serial Bit Masks }
  208.     SREAD_BITS        = $F0;        { for SerRWBits   }
  209.     SWRITE_BITS        = $0F;
  210.  
  211.     SSTOP_BITS        = $F0;        { for SerStopBuf  }
  212.     SBUFSIZE_BITS    = $0F;
  213.  
  214.     SPARITY_BITS    = $F0;        { for SerParShk }
  215.     SHSHAKE_BITS    = $0F;
  216.  
  217. { Serial Parity (upper nibble, after being shifted by
  218.  * macro SPARNUM() )
  219.  }
  220.     SPARITY_NONE    = 0;
  221.     SPARITY_EVEN    = 1;
  222.     SPARITY_ODD        = 2;
  223.  
  224. { Serial Handshake Mode (lower nibble, after masking using 
  225.  * macro SHANKNUM() )
  226.  }
  227.     SHSHAKE_XON        = 0;
  228.     SHSHAKE_RTS        = 1;
  229.     SHSHAKE_NONE    = 2;
  230.  
  231. { new defines for PrintFlags }
  232.  
  233.     CORRECT_RED        = $0001;    { color correct red shades }
  234.     CORRECT_GREEN    = $0002;    { color correct green shades }
  235.     CORRECT_BLUE    = $0004;    { color correct blue shades }
  236.  
  237.     CENTER_IMAGE    = $0008;    { center image on paper }
  238.  
  239.     IGNORE_DIMENSIONS    = $0000;    { ignore max width/height settings }
  240.     BOUNDED_DIMENSIONS    = $0010;    { use max width/height as boundaries }
  241.     ABSOLUTE_DIMENSIONS    = $0020;    { use max width/height as absolutes }
  242.     PIXEL_DIMENSIONS    = $0040;    { use max width/height as prt pixels }
  243.     MULTIPLY_DIMENSIONS    = $0080;    { use max width/height as multipliers }
  244.  
  245.     INTEGER_SCALING    = $0100;    { force integer scaling }
  246.  
  247.     ORDERED_DITHERING    = $0000;    { ordered dithering }
  248.     HALFTONE_DITHERING    = $0200;    { halftone dithering }
  249.     FLOYD_DITHERING    = $0400;    { Floyd-Steinberg dithering }
  250.  
  251.     ANTI_ALIAS        = $0800;    { anti-alias image }
  252.     GREY_SCALE2        = $1000;    { for use with hi-res monitor }
  253.  
  254. { masks used for checking bits }
  255.  
  256.     CORRECT_RGB_MASK    = CORRECT_RED + CORRECT_GREEN + CORRECT_BLUE;
  257.     DIMENSIONS_MASK    = BOUNDED_DIMENSIONS + ABSOLUTE_DIMENSIONS +
  258.                 PIXEL_DIMENSIONS + MULTIPLY_DIMENSIONS;
  259.     DITHERING_MASK    = HALFTONE_DITHERING + FLOYD_DITHERING;
  260.