DEFINITION MODULE STD_DSP;
(******************************************************************************
*                                STD_DEF .DEF                                 *
*                              ABO Software Dep.                              *
*                                                                             *
* Purpose : To provide Low Level control over various display devices,        *
*    providing a standard device dependant as possible interface. The routines*
*    provide color selection/conversion, driver and device selection, screen  *
*    swaping/selecting, attribute setting/converting.                         *
*   Notes :                                                                   *
*                                                                             *
*                                                                             *
*                                                                             *
*                                                                             *
*                                                                             *
*                                                                             *
*                                                                             *
*                                                                             *
*                                                                             *
*         Version Date : 24 May 1988                                          *
*                                                                             *
******************************************************************************)
IMPORT ;
FROM  IMPORT ;

CONST

TYPE
  AttrType     = SHORTCARD
  ColorRGBType = RECORD
    R :SHORTCARD;
    G :SHORTCARD;
    B :SHORTCARD;
    A :SHORTCARD;
  END;
  ColorHSVType = RECORD
    H :SHORTCARD;
    S :SHORTCARD;
    V :SHORTCARD;
    A :SHORTCARD;
  END;
  ColorHLSType = RECORD
    H :SHORTCARD;
    L :SHORTCARD;
    S :SHORTCARD;
    A :SHORTCARD;
  END;
  ColorCMYType = RECORD
    C :SHORTCARD;
    M :SHORTCARD;
    Y :SHORTCARD;
    A :SHORTCARD;
  END;

  SETDRIVERPROC     = PROCEDURE(SHORTCARD);
  SETMODEPROC       = PROCEDURE(SHORTCARD);
  SETSCREENPROC     = PROCEDURE(SHORTCARD);
  SETVIEWSCREENPROC = PROCEDURE(SHORTCARD);

  CLRSCREENPROC     = PROCEDURE;

  COLORPROC         = PROCEDURE(SHORTCARD,SHORTCARD,SHORTCARD,SHORTCARD):COLORTYPE;
  ATTRPROC          = PROCEDURE(SHORTCARD,SHORTCARD,BOOLEAN):ATTRTYPE;
  SETCOLORPROC      = PROCEDURE(COLORTYPE);
  SETATTRPROC       = PROCEDURE(ATTRTYPE);

VAR
  SetDevice                   :SETDEVICEPROC;
  SetDriver                   :SETDRIVERPROC;
  SetMode                     :SETMODEPROC;
  SetScreen                   :
  SetViewScreen               :
  ClearScreen                 :

  ColorHSV,ColorRGB,
  ColorHLS,ColorCMY           :COLORPROC;
  AttrFB                      :ATTRPROC;
  SetFill                     :SETCOLORPROC;
  SetLine                     :SETCOLORPROC;
  SetAttr                     :SETATTRPROC;



PROCEDURE ConvertHSVtoRGB(H,S,V,A:SHORTCARD;
                          VAR RGB:ColorRGBType);
PROCEDURE ConvertHLStoRGB(H,L,S,A:SHORTCARD;
                          VAR RGB:ColorRGBType);
PROCEDURE ConvertCMYtoRGB(C,M,Y,A:SHORTCARD;
                          VAR RGB:ColorRGBType);
PROCEDURE ConvertRGBtoCMY(R,G,B,A:SHORTCARD;
                          VAR CMY:ColorCMYType);
PROCEDURE ConvertHSVtoCMY(H,S,V,A:SHORTCARD;
                          VAR CMY:ColorCMYType);
PROCEDURE ConvertHLStoCMY(H,L,S,A:SHORTCARD;
                          VAR CMY:ColorCMYType);
PROCEDURE ConvertRGBtoHSV(R,G,B,A:SHORTCARD;
                          VAR HSV:ColorHSVType);
PROCEDURE ConvertRGBtoHLS(R,G,B,A:SHORTCARD;
                          VAR HLS:ColorHLSType);

PROCEDURE ( : ): ;


END STD_DSP.