home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / cbm / os-include.lha / os-include / intuition / preferences.h < prev    next >
C/C++ Source or Header  |  1993-10-15  |  11KB  |  303 lines

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