home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / jËzyki_programowania / ace_basic / ace / include / intuition / preferences.h < prev    next >
C/C++ Source or Header  |  1977-12-31  |  12KB  |  317 lines

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