home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / TRSICAT.LZX / CATS_CD2_TRSI / Inc&AD2.1 / includes / intuition / preferences.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-11  |  9.2 KB  |  282 lines

  1. #ifndef INTUITION_PREFERENCES_H
  2. #define INTUITION_PREFERENCES_H TRUE
  3. /*
  4. **  $VER: preferences.h 36.8 (08.05.91)
  5. **  Includes Release 38.56
  6. **
  7. **  Structure definition for old-style preferences
  8. **
  9. **  (C) Copyright 1985-1992 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifndef EXEC_TYPES_H
  14. #include <exec/types.h>
  15. #endif
  16.  
  17. #ifndef DEVICES_TIMER_H
  18. #include <devices/timer.h>
  19. #endif
  20.  
  21. /* ======================================================================== */
  22. /* === Preferences ======================================================== */
  23. /* ======================================================================== */
  24.  
  25. /* these are the definitions for the printer configurations */
  26. #define    FILENAME_SIZE    30            /* Filename size */
  27.  
  28. #define    POINTERSIZE (1 + 16 + 1) * 2    /* Size of Pointer data buffer */
  29.  
  30. /* These defines are for the default font size.  These actually describe the
  31.  * height of the defaults fonts.  The default font type is the topaz
  32.  * font, which is a fixed width font that can be used in either
  33.  * eighty-column or sixty-column mode.    The Preferences structure reflects
  34.  * which is currently selected by the value found in the variable FontSize,
  35.  * which may have either of the values defined below.  These values actually
  36.  * are used to select the height of the default font.  By changing the
  37.  * height, the resolution of the font changes as well.
  38.  */
  39. #define TOPAZ_EIGHTY 8
  40. #define TOPAZ_SIXTY 9
  41.  
  42. struct Preferences
  43. {
  44.     /* the default font height */
  45.     BYTE FontHeight;            /* height for system default font  */
  46.  
  47.     /* constant describing what's hooked up to the port */
  48.     UBYTE PrinterPort;            /* printer port connection       */
  49.  
  50.     /* the baud rate of the port */
  51.     UWORD BaudRate;            /* baud rate for the serial port   */
  52.  
  53.     /* various timing rates */
  54.     struct timeval KeyRptSpeed;        /* repeat speed for keyboard       */
  55.     struct timeval KeyRptDelay;        /* Delay before keys repeat       */
  56.     struct timeval DoubleClick;        /* Interval allowed between clicks */
  57.  
  58.     /* Intuition Pointer data */
  59.     UWORD PointerMatrix[POINTERSIZE];    /* Definition of pointer sprite    */
  60.     BYTE XOffset;            /* X-Offset for active 'bit'       */
  61.     BYTE YOffset;            /* Y-Offset for active 'bit'       */
  62.     UWORD color17;            /***********************************/
  63.     UWORD color18;            /* Colours for sprite pointer       */
  64.     UWORD color19;            /***********************************/
  65.     UWORD PointerTicks;            /* Sensitivity of the pointer       */
  66.  
  67.     /* Workbench Screen colors */
  68.     UWORD color0;            /***********************************/
  69.     UWORD color1;            /*  Standard default colours       */
  70.     UWORD color2;            /*   Used in the Workbench       */
  71.     UWORD color3;            /***********************************/
  72.  
  73.     /* positioning data for the Intuition View */
  74.     BYTE ViewXOffset;            /* Offset for top lefthand corner  */
  75.     BYTE ViewYOffset;            /* X and Y dimensions           */
  76.     WORD ViewInitX, ViewInitY;        /* View initial offset values       */
  77.  
  78.     BOOL EnableCLI;            /* CLI availability switch */
  79.  
  80.     /* printer configurations */
  81.     UWORD PrinterType;            /* printer type           */
  82.     UBYTE PrinterFilename[FILENAME_SIZE];/* file for printer       */
  83.  
  84.     /* print format and quality configurations */
  85.     UWORD PrintPitch;            /* print pitch               */
  86.     UWORD PrintQuality;            /* print quality           */
  87.     UWORD PrintSpacing;            /* number of lines per inch       */
  88.     UWORD PrintLeftMargin;        /* left margin in characters       */
  89.     UWORD PrintRightMargin;        /* right margin in characters       */
  90.     UWORD PrintImage;            /* positive or negative           */
  91.     UWORD PrintAspect;            /* horizontal or vertical       */
  92.     UWORD PrintShade;            /* b&w, half-tone, or color       */
  93.     WORD PrintThreshold;        /* darkness ctrl for b/w dumps       */
  94.  
  95.     /* print paper descriptors */
  96.     UWORD PaperSize;            /* paper size               */
  97.     UWORD PaperLength;            /* paper length in number of lines */
  98.     UWORD PaperType;            /* continuous or single sheet       */
  99.  
  100.     /* Serial device settings: These are six nibble-fields in three bytes */
  101.     /* (these look a little strange so the defaults will map out to zero) */
  102.     UBYTE   SerRWBits;     /* upper nibble = (8-number of read bits)    */
  103.              /* lower nibble = (8-number of write bits)    */
  104.     UBYTE   SerStopBuf;  /* upper nibble = (number of stop bits - 1)    */
  105.              /* lower nibble = (table value for BufSize)    */
  106.     UBYTE   SerParShk;     /* upper nibble = (value for Parity setting)    */
  107.              /* lower nibble = (value for Handshake mode)    */
  108.     UBYTE   LaceWB;     /* if workbench is to be interlaced        */
  109.  
  110.     UBYTE   WorkName[FILENAME_SIZE];  /* temp file for printer        */
  111.  
  112.     BYTE    RowSizeChange;    /* affect NormalDisplayRows/Columns    */
  113.     BYTE    ColumnSizeChange;
  114.  
  115.     UWORD    PrintFlags;    /* user preference flags */
  116.     UWORD    PrintMaxWidth;    /* max width of printed picture in 10ths/in */
  117.     UWORD    PrintMaxHeight;    /* max height of printed picture in 10ths/in */
  118.     UBYTE    PrintDensity;    /* print density */
  119.     UBYTE    PrintXOffset;    /* offset of printed picture in 10ths/inch */
  120.  
  121.     UWORD    wb_Width;        /* override default workbench width  */
  122.     UWORD    wb_Height;        /* override default workbench height */
  123.     UBYTE    wb_Depth;        /* override default workbench depth  */
  124.  
  125.     UBYTE    ext_size;        /* extension information -- do not touch! */
  126.                 /* extension size in blocks of 64 bytes */
  127. };
  128.  
  129.  
  130. /* Workbench Interlace (use one bit) */
  131. #define LACEWB            (1<< 0)
  132. #define LW_RESERVED    1        /* internal use only */
  133.  
  134. /* Enable_CLI    */
  135. #define SCREEN_DRAG    (1<<14)
  136. #define MOUSE_ACCEL    (1L<<15)
  137.  
  138. /* PrinterPort */
  139. #define PARALLEL_PRINTER 0x00
  140. #define SERIAL_PRINTER    0x01
  141.  
  142. /* BaudRate */
  143. #define BAUD_110    0x00
  144. #define BAUD_300    0x01
  145. #define BAUD_1200    0x02
  146. #define BAUD_2400    0x03
  147. #define BAUD_4800    0x04
  148. #define BAUD_9600    0x05
  149. #define BAUD_19200    0x06
  150. #define BAUD_MIDI    0x07
  151.  
  152. /* PaperType */
  153. #define FANFOLD    0x00
  154. #define SINGLE        0x80
  155.  
  156. /* PrintPitch */
  157. #define PICA        0x000
  158. #define ELITE        0x400
  159. #define FINE        0x800
  160.  
  161. /* PrintQuality */
  162. #define DRAFT        0x000
  163. #define LETTER        0x100
  164.  
  165. /* PrintSpacing */
  166. #define SIX_LPI        0x000
  167. #define EIGHT_LPI    0x200
  168.  
  169. /* Print Image */
  170. #define IMAGE_POSITIVE    0x00
  171. #define IMAGE_NEGATIVE    0x01
  172.  
  173. /* PrintAspect */
  174. #define ASPECT_HORIZ    0x00
  175. #define ASPECT_VERT    0x01
  176.  
  177. /* PrintShade */
  178. #define SHADE_BW    0x00
  179. #define SHADE_GREYSCALE    0x01
  180. #define SHADE_COLOR    0x02
  181.  
  182. /* PaperSize */
  183. #define US_LETTER    0x00
  184. #define US_LEGAL    0x10
  185. #define N_TRACTOR    0x20
  186. #define W_TRACTOR    0x30
  187. #define CUSTOM        0x40
  188.  
  189. /* New PaperSizes for V36: */
  190. #define EURO_A0    0x50        /* European size A0: 841 x 1189 */
  191. #define EURO_A1    0x60        /* European size A1: 594 x 841 */
  192. #define EURO_A2    0x70        /* European size A2: 420 x 594 */
  193. #define EURO_A3    0x80        /* European size A3: 297 x 420 */
  194. #define EURO_A4    0x90        /* European size A4: 210 x 297 */
  195. #define EURO_A5    0xA0        /* European size A5: 148 x 210 */
  196. #define EURO_A6    0xB0        /* European size A6: 105 x 148 */
  197. #define EURO_A7    0xC0        /* European size A7: 74 x 105 */
  198. #define EURO_A8    0xD0        /* European size A8: 52 x 74 */
  199.  
  200.  
  201. /* PrinterType */
  202. #define CUSTOM_NAME        0x00
  203. #define    ALPHA_P_101        0x01
  204. #define BROTHER_15XL        0x02
  205. #define CBM_MPS1000        0x03
  206. #define DIAB_630        0x04
  207. #define DIAB_ADV_D25        0x05
  208. #define DIAB_C_150        0x06
  209. #define EPSON            0x07
  210. #define EPSON_JX_80        0x08
  211. #define OKIMATE_20        0x09
  212. #define QUME_LP_20        0x0A
  213. /* new printer entries, 3 October 1985 */
  214. #define HP_LASERJET        0x0B
  215. #define HP_LASERJET_PLUS    0x0C
  216.  
  217. /* Serial Input Buffer Sizes */
  218. #define SBUF_512    0x00
  219. #define SBUF_1024    0x01
  220. #define SBUF_2048    0x02
  221. #define SBUF_4096    0x03
  222. #define SBUF_8000    0x04
  223. #define SBUF_16000    0x05
  224.  
  225. /* Serial Bit Masks */
  226. #define    SREAD_BITS    0xF0 /* for SerRWBits    */
  227. #define    SWRITE_BITS    0x0F
  228.  
  229. #define    SSTOP_BITS    0xF0 /* for SerStopBuf    */
  230. #define    SBUFSIZE_BITS    0x0F
  231.  
  232. #define    SPARITY_BITS    0xF0 /* for SerParShk    */
  233. #define SHSHAKE_BITS    0x0F
  234.  
  235. /* Serial Parity (upper nibble, after being shifted by
  236.  * macro SPARNUM() )
  237.  */
  238. #define SPARITY_NONE     0
  239. #define SPARITY_EVEN     1
  240. #define SPARITY_ODD     2
  241. /* New parity definitions for V36: */
  242. #define SPARITY_MARK     3
  243. #define SPARITY_SPACE     4
  244.  
  245. /* Serial Handshake Mode (lower nibble, after masking using
  246.  * macro SHANKNUM() )
  247.  */
  248. #define SHSHAKE_XON     0
  249. #define SHSHAKE_RTS     1
  250. #define SHSHAKE_NONE     2
  251.  
  252. /* new defines for PrintFlags */
  253.  
  254. #define CORRECT_RED        0x0001  /* color correct red shades */
  255. #define CORRECT_GREEN        0x0002  /* color correct green shades */
  256. #define CORRECT_BLUE        0x0004  /* color correct blue shades */
  257.  
  258. #define CENTER_IMAGE        0x0008  /* center image on paper */
  259.  
  260. #define IGNORE_DIMENSIONS   0x0000 /* ignore max width/height settings */
  261. #define BOUNDED_DIMENSIONS  0x0010  /* use max width/height as boundaries */
  262. #define ABSOLUTE_DIMENSIONS 0x0020  /* use max width/height as absolutes */
  263. #define PIXEL_DIMENSIONS    0x0040  /* use max width/height as prt pixels */
  264. #define MULTIPLY_DIMENSIONS 0x0080 /* use max width/height as multipliers */
  265.  
  266. #define INTEGER_SCALING     0x0100  /* force integer scaling */
  267.  
  268. #define ORDERED_DITHERING   0x0000 /* ordered dithering */
  269. #define HALFTONE_DITHERING  0x0200  /* halftone dithering */
  270. #define FLOYD_DITHERING     0x0400 /* Floyd-Steinberg dithering */
  271.  
  272. #define ANTI_ALIAS        0x0800 /* anti-alias image */
  273. #define GREY_SCALE2        0x1000 /* for use with hi-res monitor */
  274.  
  275. /* masks used for checking bits */
  276.  
  277. #define CORRECT_RGB_MASK    (CORRECT_RED|CORRECT_GREEN|CORRECT_BLUE)
  278. #define DIMENSIONS_MASK     (BOUNDED_DIMENSIONS|ABSOLUTE_DIMENSIONS|PIXEL_DIMENSIONS|MULTIPLY_DIMENSIONS)
  279. #define DITHERING_MASK        (HALFTONE_DITHERING|FLOYD_DITHERING)
  280.  
  281. #endif
  282.