DEFINITION MODULE Prefs; (*$ Implementation:=FALSE *)
(* 05-Jun-1993/bp *)

(* V39 *)

FROM SYSTEM     IMPORT CAST,BITSET,LONGSET,SHORTSET;
FROM GraphicsD  IMPORT TextAttr,Point,Rectangle;
FROM IntuitionD IMPORT ColorSpec;
FROM Timer      IMPORT TimeVal;


(* prefhdr.h *)
TYPE
  PrefHeaderPtr=POINTER TO PrefHeader;
  PrefHeader=RECORD
    version:SHORTCARD;
    type:SHORTCARD;
    flags:LONGSET;
  END;
CONST
  idPREF=CAST(LONGCARD,'PREF');
  idPRHD=CAST(LONGCARD,'PRHD');


(* font.h *)
TYPE
  FontPrefsPtr=POINTER TO FontPrefs;
  FontPrefs=RECORD
    reserved:ARRAY[1..3] OF LONGINT;
    reserved2:CARDINAL;
    type:CARDINAL;
    frontPen,
    backPen:SHORTCARD;
    drawMode:SHORTSET;
    textAttr:TextAttr;
    name:ARRAY [0..128-1] OF CHAR;
  END;
CONST
  idFONT=CAST(LONGCARD,'FONT');
  wbFont=0;
  sysFont=1;
  screenFont=2;


(* icontrol.h *)
TYPE
  IControlPrefsPtr=POINTER TO IControlPrefs;
  IControlPrefs=RECORD
    reserved:ARRAY[1..4] OF LONGINT;
    timeOut:CARDINAL;
    metaDrag:INTEGER;
    flags:LONGSET;
    wbToFront,
    frontToBack,
    reqTrue,
    reqFalse:SHORTCARD;
  END;
CONST
  idICTL=CAST(LONGCARD,'ICTL');
  (* FlagBits: *)
  coerceColors=0;
  coerceLace=1;
  strGadFilter=2;
  menuSnap=3;

(* input.h *)
TYPE
  InputPrefsPtr=POINTER TO InputPrefs;
  InputPrefs=RECORD
    keymap:ARRAY [0..15] OF CHAR;
    pointerTicks:CARDINAL;
    doubleClick:TimeVal;
    keyRptDelay:TimeVal;
    keyRptSpeed:TimeVal;
    mouseAccel:INTEGER;
  END;
CONST
  idINPT=CAST(LONGCARD,'INPT');


(* locale.h *)
TYPE
  CountryPrefsPtr=POINTER TO CountryPrefs;
  CountryPrefs=RECORD (* Record läßt sich nicht exakt definieren!!! *)
    reserved:ARRAY[1..4] OF LONGINT;
    countryCode:LONGCARD;
    telephoneCode:LONGCARD;
    measuringSystem:SHORTCARD;
  (* Wegen des Alignments stehen alle weiteren Felder 1 Byte zu weit! *)
    dateTimeFormat:ARRAY [1..80] OF CHAR;
    dateFormat:ARRAY [1..40] OF CHAR;
    timeFormat:ARRAY [1..40] OF CHAR;
    shortDateTimeFormat:ARRAY [1..80] OF CHAR;
    shortDateFormat:ARRAY [1..40] OF CHAR;
    shortTimeFormat:ARRAY [1..40] OF CHAR;
    decimalPoint:ARRAY [1..10] OF CHAR;
    groupSeparator:ARRAY [1..10] OF CHAR;
    fracGroupSeparator:ARRAY [1..10] OF CHAR;
    grouping:ARRAY [1..10] OF SHORTCARD;
    fracGrouping:ARRAY [1..10] OF SHORTCARD;
    monDecimalPoint:ARRAY [1..10] OF CHAR;
    monGroupSeparator:ARRAY [1..10] OF CHAR;
    monFracGroupSeparator:ARRAY [1..10] OF CHAR;
    monGrouping:ARRAY [1..10] OF SHORTCARD;
    monFracGrouping:ARRAY [1..10] OF SHORTCARD;
    monFracDigits:SHORTCARD;
    monIntFracDigits:SHORTCARD;
    monCS:ARRAY [1..10] OF CHAR;
    monSmallCS:ARRAY [1..10] OF CHAR;
    monIntCS:ARRAY [1..10] OF CHAR;
    monPositiveSign:ARRAY [1..10] OF CHAR;
    monPositiveSpaceSep:SHORTCARD;
    monPositiveSignPos:SHORTCARD;
    monPositiveCSPos:SHORTCARD;
    monNegativeSign:ARRAY [1..10] OF CHAR;
    monNegativeSpaceSep:SHORTCARD;
    monNegativeSignPos:SHORTCARD;
    monNegativeCSPos:SHORTCARD;
    calendarType:SHORTCARD;
  END;

  LocalePrefsPtr=POINTER TO LocalePrefs;
  LocalePrefs=RECORD
    reserved:ARRAY[1..4] OF LONGINT;
    countryName:ARRAY [0..31] OF CHAR;
    preferredLanguages: ARRAY [0..9] OF ARRAY [0..29] OF CHAR;
    gmtOffset:LONGINT;
    flags:LONGSET;
    countryData:CountryPrefs;
  END;
CONST
  idLCLE=CAST(LONGCARD,'LCLE');
  idCTRY=CAST(LONGCARD,'CTRY');


(* overscan.h *)
TYPE
  OverscanPrefsPtr=POINTER TO OverscanPrefs;
  OverscanPrefs=RECORD
    reserved:ARRAY[1..4] OF LONGINT;
    displayID:LONGCARD;
    viewPos:Point;
    text:Point;
    standard:Rectangle;
  END;
CONST
  idOSCN=CAST(LONGCARD,'OSCN');


(* palette.h *)
TYPE
  PalettePrefsPtr=POINTER TO PalettePrefs;
  PalettePrefs=RECORD
    reserved:ARRAY[1..4] OF LONGINT;
    p4ColorPens:ARRAY[1..32] OF CARDINAL;
    p8ColorPens:ARRAY[1..32] OF CARDINAL;
    colors:ARRAY[1..32] OF ColorSpec;
  END;
CONST
  idPALT=CAST(LONGCARD,'PALT');


(* pointer.h *)
TYPE
  PointerPrefsPtr=POINTER TO PointerPrefs;
  PointerPrefs=RECORD
    reserved:ARRAY[1..4] OF LONGINT;
    which:CARDINAL;
    size:CARDINAL;
    width:CARDINAL;
    height:CARDINAL;
    depth:CARDINAL;
    ySize:CARDINAL;
    x,
    y:CARDINAL;
    (* Color Table ... *)
    (* Data ... *)
  END;
  RGBTable=RECORD (* Achtung: Alignment! *)
    red,
    green,
    blue:SHORTCARD;
  END;
CONST
  idPNTR=CAST(LONGCARD,'PNTR');
  wbpNormal=0;
  wbpBusy=1;


(* printergfx.h *)
TYPE
  PrinterGfxPrefsPtr=POINTER TO PrinterGfxPrefs;
  PrinterGfxPrefs=RECORD
    reserved:ARRAY[1..4] OF LONGINT;
    aspect:CARDINAL;
    shade:CARDINAL;
    image:CARDINAL;
    threshold:INTEGER;
    colorCorrect:SHORTSET;
    dimensions:SHORTCARD;
    dithering:SHORTCARD;
    (* Autom. Pad-Byte. Ok. *)
    graphicFlags:BITSET;
    printDensity:SHORTCARD;
    (* Autom. Pad-Byte. Ok. *)
    printMaxWidth:CARDINAL;
    printMaxHeight:CARDINAL;
    printXOffset:CARDINAL;
    printYOffset:CARDINAL;
  END;
CONST
  idPGFX=CAST(LONGCARD,'PGFX');

  (* PrinterGfxPrefs.aspect *)
  paHorizontal=0;
  paVertical=1;

  (* PrinterGfxPrefs.shade *)
  psBw		=0;
  psgreyScale	=1;
  psColor	=2;
  psgreyScale2	=3;

  (* PrinterGfxPrefs.image *)
  piPositive=0;
  piNegative=1;

  (* Bits f. PrinterGfxPrefs.colorCorrect *)
  pccRed  =0;
  pccGreen=1;
  pccBlue =2;

  (* PrinterGfxPrefs.dimensions *)
  pdIgnore  =0;
  pdBounded =1;
  pdAbsolute=2;
  pdPixel   =3;
  pdMultiply=4;

  (* PrinterGfxPrefs.dithering *)
  pdOrdered	=0;
  pdHalftone	=1;
  pdFloyd	=2;

  (* Bits f. PrinterGfxPrefs.graphicFlags *)
  pgfcenterImage   =0;
  pgfIntegerScaling=1;
  pgfAntiAlias	   =2;


(* printerps.h *)
TYPE
  PrinterPSPrefsPtr=POINTER TO PrinterPSPrefs;
  PrinterPSPrefs=RECORD
    reserved:ARRAY[1..4] OF LONGINT;
    driverMode:SHORTCARD;
    paperFormat:SHORTCARD;
    reserved1:ARRAY [1..2] OF SHORTCARD;
    copies:LONGINT;
    paperWidth:LONGINT;
    paperHeight:LONGINT;
    horizontalDPI:LONGINT;
    verticalDPI:LONGINT;
    font:SHORTCARD;
    pitch:SHORTCARD;
    orientation:SHORTCARD;
    tab:SHORTCARD;
    reserved2:ARRAY [1..8] OF SHORTCARD;
    leftMargin:LONGINT;
    rightMargin:LONGINT;
    topMargin:LONGINT;
    bottomMargin:LONGINT;
    fontPointSize:LONGINT;
    leading:LONGINT;
    reserved3:ARRAY [1..8] OF SHORTCARD;
    leftEdge:LONGINT;
    topEdge:LONGINT;
    width:LONGINT;
    height:LONGINT;
    image:SHORTCARD;
    shading:SHORTCARD;
    dithering:SHORTCARD;
    transparency:SHORTCARD;
    reserved4:ARRAY [1..8] OF SHORTCARD;
    aspect:SHORTCARD;
    scalingType:SHORTCARD;
    scalingMath:SHORTCARD;
    centering:SHORTCARD;
    reserved5:ARRAY [1..8] OF SHORTCARD;
  END;
CONST
  idPSPD=CAST(LONGCARD,'PSPD');

  (* PrinterPSPrefs.driverMode *)
  dmPostScript =0;
  dmPassThrough=1;

  (* PrinterPSPrefs.paperFormat *)
  pfUsLetter=0;
  pfUsLegal =1;
  pfA4	    =2;
  pfCustom  =3;

  (* PrinterPSPrefs.font *)
  fontCourier	  =0;
  fontTimes	  =1;
  fontHelvetica	  =2;
  fontHelvnarrow  =3;
  fontAvantgarde  =4;
  fontBookman	  =5;
  fontNewcent	  =6;
  fontPalatino	  =7;
  fontZapfchancery=8;

  (* PrinterPSPrefs.pitch *)
  pitchNormal	 =0;
  pitchCompressed=1;
  pitchExpanded	 =2;

  (* PrinterPSPrefs.orientation *)
  orientPortrait =0;
  orientLandscape=1;

  (* PrinterPSPrefs.tab *)
  tab4	  =0;
  tab8	  =1;
  tabQuart=2;
  tabHalf =3;
  tabInch =4;

  (* PrinterPSPrefs.image *)
  imPositive=0;
  imNegative=1;

  (* PrinterPSPrefs.shading *)
  shadBw       =0;
  shadGreyScale=1;
  shadColor    =2;

  (* PrinterPSPrefs.dithering *)
  dithDefault=0;
  dithDotty  =1;
  dithVert   =2;
  dithHoriz  =3;
  dithDiag   =4;

  (* PrinterPSPrefs.transparency *)
  transNone  =0;
  transWhite =1;
  transColor0=2;

  (* PrinterPSPrefs.aspect *)
  aspHoriz=0;
  aspVert =1;

  (* PrinterPSPrefs.scalingType *)
  stAspectAsis=0;
  stAspectWide=1;
  stAspectTall=2;
  stAspectBoth=3;
  stFitsWide  =4;
  stFitsTall  =5;
  stFitsBoth  =6;

  (* PrinterPSPrefs.scalingMath *)
  smInteger   =0;
  smFractional=1;

  (* PrinterPSPrefs.centering *)
  centNone =0;
  centHoriz=1;
  centVert =2;
  centBoth =3;


(* printertxt.h *)
TYPE
  PrinterTxtPrefsPtr=POINTER TO PrinterTxtPrefs;
  PrinterTxtPrefs=RECORD
    reserved:ARRAY[1..4] OF LONGINT;
    driver:ARRAY [1..30] OF CHAR;
    port:SHORTCARD;
    (* Autom. Pad-Byte. Ok. *)
    paperType:CARDINAL;
    paperSize:CARDINAL;
    paperLength:CARDINAL;
    pitch:CARDINAL;
    spacing:CARDINAL;
    leftMargin:CARDINAL;
    rightMargin:CARDINAL;
    quality:CARDINAL;
  END;

  PrinterUnitPrefsPtr=POINTER TO PrinterUnitPrefs;
  PrinterUnitPrefs=RECORD
    reserved:ARRAY[1..4] OF LONGINT;
    unitNum:LONGINT;
    openDeviceFlags:LONGSET;
    deviceName:ARRAY [1..32] OF CHAR;
  END;
CONST
  idPTXT=CAST(LONGCARD,'PTXT');
  idPUNT=CAST(LONGCARD,'PUNT');

  (* PrinterTxtPrefs.port *)
  ppParallel=0;
  ppSerial  =1;

  (* PrinterTxtPrefs.paperType *)
  ptFanfold=0;
  ptSingle =1;

  (* PrinterTxtPrefs.paperSize *)
  psUsLetter	=0;
  psUsLegal	=1;
  psNTractor	=2;
  psWTractor	=3;
  psCustom	=4;
  psEuroA0	=5;
  psEuroA1	=6;
  psEuroA2	=7;
  psEuroA3	=8;
  psEuroA4	=9;
  psEuroA5	=10;
  psEuroa6	=11;
  psEuroA7	=12;
  psEuroA8	=13;

  (* PrinterTxtPrefs.printPitch *)
  ppPica =0;
  ppElite=1;
  ppFine =2;

  (* PrinterTxtPrefs.printSpacing *)
  psSixLpi  =0;
  psEightLpi=1;

  (* PrinterTxtPrefs.printQuality *)
  pqDraft =0;
  pqLetter=1;


(* screenmode.h *)
TYPE
  ScreenModePrefsPtr=POINTER TO ScreenModePrefs;
  ScreenModePrefs=RECORD
    reserved:ARRAY[1..4] OF LONGINT;
    displayID:LONGCARD;
    width,
    height,
    depth:CARDINAL;
    control:BITSET;
  END;
CONST
  idSCRM=CAST(LONGCARD,'SCRM');

  (* Bits f. ScreenModePrefs.control *)
  smAutoScroll=0;


(* serial.h *)
TYPE
  SerialPrefsPtr=POINTER TO SerialPrefs;
  SerialPrefs=RECORD
    reserved:ARRAY[1..3] OF LONGINT;
    unit0Map:LONGCARD;
    baudRate:LONGCARD;
    inputBuffer:LONGCARD;
    outputBuffer:LONGCARD;
    inputHandshake:SHORTCARD;
    outputHandshake:SHORTCARD;
    parity:SHORTCARD;
    bitsPerChar:SHORTCARD;
    stopBits:SHORTCARD;
  END;
CONST
  idSERL=CAST(LONGCARD,'SERL');

  (* SerialPrefs.parity *)
  parityNone =0;
  parityEven =1;
  parityOdd  =2;
  parityMark =3;
  paritySpace=4;

  (* SerialPrefs.input/outputHandshaking *)
  hShakeXon =0;
  hShakeRts =1;
  hShakeNone=2;


(* sound.h *)
TYPE
  SoundPrefsPtr=POINTER TO SoundPrefs;
  SoundPrefs=RECORD
    reserved:ARRAY[1..4] OF LONGINT;
    displayQueue:BOOLEAN;
    audioQueue:BOOLEAN;
    audioType:CARDINAL;
    audioVolume:CARDINAL;
    audioPeriod:CARDINAL;
    audioDuration:CARDINAL;
    audioFileName:ARRAY [1..256] OF CHAR;
  END;
CONST
  idSOND=CAST(LONGCARD,'SOND');

  (* SoundPrefs.audioType *)
  spTypeBeep  =0;
  spTypeSample=1;


(* wbpattern.h *)
TYPE
  WBPatternPrefsPtr=POINTER TO WBPatternPrefs;
  WBPatternPrefs=RECORD
    reserved:ARRAY[1..4] OF LONGINT;
    which:CARDINAL;
    flags:BITSET;
    revision:SHORTINT;
    depth:SHORTINT;
    dataLength:CARDINAL;
    (* data ... *)
  END;
CONST
  idPTRN=CAST(LONGCARD,'PTRN');

  (* WBPatternPrefs.which *)
  wbpRoot  =0;
  wbpDrawer=1;
  wbpScreen=2;

  (* Bits f. WBPatternPrefs.flags *)
  wbpPattern=0;
  wbpNoRemap=4;

  maxDepth=3;
  defPatDepth=2;
  patWidth =16;
  patHeight=16;


END Prefs.noimp
