;
; **  $VER: preferences.h 38.2 (16.9.92)
; **  Includes Release 40.15
; **
; **  Structure definition for old-style preferences
; **
; **  (C) Copyright 1985-1993 Commodore-Amiga, Inc.
; **     All Rights Reserved
;

IncludePath   "PureInclude:"
XIncludeFile "devices/timer.pb"

;  ========================================================================
;  === Preferences ========================================================
;  ========================================================================

;  these are the definitions for the printer configurations
#FILENAME_SIZE = 30 ;  Filename size
#DEVNAME_SIZE = 16 ;  Device-name size

#POINTERSIZE = (1 + 16 + 1) * 2 ;  Size of Pointer data buffer

;  These defines are for the default font size.  These actually describe the
;  * height of the defaults fonts.  The default font type is the topaz
;  * font, which is a fixed width font that can be used in either
;  * eighty-column or sixty-column mode. The Preferences structure reflects
;  * which is currently selected by the value found in the variable FontSize,
;  * which may have either of the values defined below.  These values actually
;  * are used to select the height of the default font.  By changing the
;  * height, the resolution of the font changes as well.
;
#TOPAZ_EIGHTY = 8
#TOPAZ_SIXTY = 9

;  Note:  Starting with V36, and continuing with each new version of
;  * Intuition, an increasing number of fields of struct Preferences
;  * are ignored by SetPrefs().  (Some fields are obeyed only at the
;  * initial SetPrefs(), which comes from the devs:system-configuration
;  * file).  Elements are generally superseded as new hardware or software
;  * features demand more information than fits in struct Preferences.
;  * Parts of struct Preferences must be ignored so that applications
;  * calling GetPrefs(), modifying some other part of struct Preferences,
;  * then calling SetPrefs(), don't end up truncating the extended
;  * data.
;  *
;  * Consult the autodocs for SetPrefs() for further information as
;  * to which fields are not always respected.
;

Structure Preferences

    ;  the default font height
    FontHeight.b   ;  height for system default font

    ;  constant describing what's hooked up to the port
    PrinterPort.b   ;  printer port connection

    ;  the baud rate of the port
    BaudRate.w   ;  baud rate for the serial port

    ;  various timing rates
    KeyRptSpeed.timeval  ;  repeat speed for keyboard
    KeyRptDelay.timeval  ;  Delay before keys repeat
    DoubleClick.timeval  ;  Interval allowed between clicks

    ;  Intuition Pointer data
    PointerMatrix.w[#POINTERSIZE] ;  Definition of pointer sprite
    XOffset.b   ;  X-Offset for active 'bit'
    YOffset.b   ;  Y-Offset for active 'bit'
    color17.w   ; *********************************
    color18.w   ;  Colours for sprite pointer
    color19.w   ; *********************************
    PointerTicks.w   ;  Sensitivity of the pointer

    ;  Workbench Screen colors
    color0.w   ; *********************************
    color1.w   ;   Standard default colours
    color2.w   ;    Used in the Workbench
    color3.w   ; *********************************

    ;  positioning data for the Intuition View
    ViewXOffset.b   ;  Offset for top lefthand corner
    ViewYOffset.b   ;  X and Y dimensions
    ViewInitX.w
    ViewInitY.w  ;  View initial offset values

    EnableCLI.w   ;  CLI availability switch

    ;  printer configurations
    PrinterType.w   ;  printer type
    PrinterFilename.b[#FILENAME_SIZE];  file for printer

    ;  print format and quality configurations
    PrintPitch.w   ;  print pitch
    PrintQuality.w   ;  print quality
    PrintSpacing.w   ;  number of lines per inch
    PrintLeftMargin.w  ;  left margin in characters
    PrintRightMargin.w  ;  right margin in characters
    PrintImage.w   ;  positive or negative
    PrintAspect.w   ;  horizontal or vertical
    PrintShade.w   ;  b&w, half-tone, or color
    PrintThreshold.w  ;  darkness ctrl for b/w dumps

    ;  print paper descriptors
    PaperSize.w   ;  paper size
    PaperLength.w   ;  paper length in number of lines
    PaperType.w   ;  continuous or single sheet

    ;  Serial device settings: These are six nibble-fields in three bytes
    ;  (these look a little strange so the defaults will map out to zero)
    SerRWBits.b  ;  upper nibble = (8-number of read bits)
    ;  lower nibble = (8-number of write bits)
    SerStopBuf.b  ;  upper nibble = (number of stop bits - 1)
    ;  lower nibble = (table value for BufSize)
    SerParShk.b  ;  upper nibble = (value for Parity setting)
    ;  lower nibble = (value for Handshake mode)
    LaceWB.b  ;  if workbench is to be interlaced

    Pad.b[12]
    PrtDevName.b[#DEVNAME_SIZE] ;  device used by printer.device
;       * (omit the ".device")
;
    DefaultPrtUnit.b ;  default unit opened by printer.device
    DefaultSerUnit.b ;  default serial unit

    RowSizeChange.b ;  affect NormalDisplayRows/Columns
    ColumnSizeChange.b

    PrintFlags.w ;  user preference flags
    PrintMaxWidth.w ;  max width of printed picture in 10ths/in
    PrintMaxHeight.w ;  max height of printed picture in 10ths/in
    PrintDensity.b ;  print density
    PrintXOffset.b ;  offset of printed picture in 10ths/inch

    wb_Width.w  ;  override default workbench width
    wb_Height.w  ;  override default workbench height
    wb_Depth.b  ;  override default workbench depth

    ext_size.b  ;  extension information -- do not touch!
       ;  extension size in blocks of 64 bytes
EndStructure


;  Workbench Interlace (use one bit)
#LACEWB   = (1 <<  0)
#LW_RESERVED = 1  ;  internal use only

;  Enable_CLI
#SCREEN_DRAG = (1 << 14)
#MOUSE_ACCEL = (1 << 15)

;  PrinterPort
#PARALLEL_PRINTER = $00
#SERIAL_PRINTER = $01

;  BaudRate
#BAUD_110 = $00
#BAUD_300 = $01
#BAUD_1200 = $02
#BAUD_2400 = $03
#BAUD_4800 = $04
#BAUD_9600 = $05
#BAUD_19200 = $06
#BAUD_MIDI = $07

;  PaperType
#FANFOLD = $00
#SINGLE  = $80

;  PrintPitch
#PICA  = $000
#ELITE  = $400
#FINE  = $800

;  PrintQuality
#DRAFT  = $000
#LETTER  = $100

;  PrintSpacing
#SIX_LPI  = $000
#EIGHT_LPI = $200

;  Print Image
#IMAGE_POSITIVE = $00
#IMAGE_NEGATIVE = $01

;  PrintAspect
#ASPECT_HORIZ = $00
#ASPECT_VERT = $01

;  PrintShade
#SHADE_BW = $00
#SHADE_GREYSCALE = $01
#SHADE_COLOR = $02

;  PaperSize (all paper sizes have a zero in the lowest nybble)
#US_LETTER = $00
#US_LEGAL = $10
#N_TRACTOR = $20
#W_TRACTOR = $30
#CUSTOM  = $40

;  New PaperSizes for V36:
#EURO_A0 = $50  ;  European size A0: 841 x 1189
#EURO_A1 = $60  ;  European size A1: 594 x 841
#EURO_A2 = $70  ;  European size A2: 420 x 594
#EURO_A3 = $80  ;  European size A3: 297 x 420
#EURO_A4 = $90  ;  European size A4: 210 x 297
#EURO_A5 = $A0  ;  European size A5: 148 x 210
#EURO_A6 = $B0  ;  European size A6: 105 x 148
#EURO_A7 = $C0  ;  European size A7: 74 x 105
#EURO_A8 = $D0  ;  European size A8: 52 x 74


;  PrinterType
#CUSTOM_NAME  = $00
#ALPHA_P_101  = $01
#BROTHER_15XL  = $02
#CBM_MPS1000  = $03
#DIAB_630  = $04
#DIAB_ADV_D25  = $05
#DIAB_C_150  = $06
#EPSON   = $07
#EPSON_JX_80  = $08
#OKIMATE_20  = $09
#QUME_LP_20  = $0A
;  new printer entries, 3 October 1985
#HP_LASERJET  = $0B
#HP_LASERJET_PLUS = $0C

;  Serial Input Buffer Sizes
#SBUF_512 = $00
#SBUF_1024 = $01
#SBUF_2048 = $02
#SBUF_4096 = $03
#SBUF_8000 = $04
#SBUF_16000 = $05

;  Serial Bit Masks
#SREAD_BITS = $F0 ;  for SerRWBits
#SWRITE_BITS = $0F

#SSTOP_BITS = $F0 ;  for SerStopBuf
#SBUFSIZE_BITS = $0F

#SPARITY_BITS = $F0 ;  for SerParShk
#SHSHAKE_BITS = $0F

;  Serial Parity (upper nibble, after being shifted by
;  * macro SPARNUM() )
;
#SPARITY_NONE  = 0
#SPARITY_EVEN  = 1
#SPARITY_ODD  = 2
;  New parity definitions for V36:
#SPARITY_MARK  = 3
#SPARITY_SPACE  = 4

;  Serial Handshake Mode (lower nibble, after masking using
;  * macro SHANKNUM() )
;
#SHSHAKE_XON  = 0
#SHSHAKE_RTS  = 1
#SHSHAKE_NONE  = 2

;  new defines for PrintFlags

#CORRECT_RED     = $0001  ;  color correct red shades
#CORRECT_GREEN     = $0002  ;  color correct green shades
#CORRECT_BLUE     = $0004  ;  color correct blue shades

#CENTER_IMAGE     = $0008  ;  center image on paper

#IGNORE_DIMENSIONS   = $0000 ;  ignore max width/height settings
#BOUNDED_DIMENSIONS  = $0010  ;  use max width/height as boundaries
#ABSOLUTE_DIMENSIONS = $0020  ;  use max width/height as absolutes
#PIXEL_DIMENSIONS    = $0040  ;  use max width/height as prt pixels
#MULTIPLY_DIMENSIONS = $0080 ;  use max width/height as multipliers

#INTEGER_SCALING     = $0100  ;  force integer scaling

#ORDERED_DITHERING   = $0000 ;  ordered dithering
#HALFTONE_DITHERING  = $0200  ;  halftone dithering
#FLOYD_DITHERING     = $0400 ;  Floyd-Steinberg dithering

#ANTI_ALIAS     = $0800 ;  anti-alias image
#GREY_SCALE2     = $1000 ;  for use with hi-res monitor

;  masks used for checking bits

#CORRECT_RGB_MASK    = (#CORRECT_RED|#CORRECT_GREEN|#CORRECT_BLUE)
#DIMENSIONS_MASK     = (#BOUNDED_DIMENSIONS|#ABSOLUTE_DIMENSIONS|#PIXEL_DIMENSIONS|#MULTIPLY_DIMENSIONS)
#DITHERING_MASK     = (#HALFTONE_DITHERING|#FLOYD_DITHERING)

