DEFINITION FOR LIBRARY MODULE ColorWheel ;

FROM SYSTEM	IMPORT ADDRESS ;
FROM Utility	IMPORT TAG_USER ;

(* For use with the WHEEL_HSB tag *)

TYPE
  ColorWheelHSBPtr = POINTER TO ColorWheelHSB ;
  ColorWheelRGBPtr = POINTER TO ColorWheelRGB ;

  ColorWheelHSB = RECORD
    cw_Hue	  : LONGINT ;
    cw_Saturation : LONGINT ;
    cw_Brightness : LONGINT ;
  END ;

(* For use with the WHEEL_RGB tag *)

  ColorWheelRGB = RECORD
    cw_Red 	: LONGINT ;
    cw_Green	: LONGINT ;
    cw_Blue	: LONGINT ;
  END ;

CONST
  WHEEL_Dummy	       = (TAG_USER+004000000H) ;
  WHEEL_Hue	       = (WHEEL_Dummy+1)  ; (* set/get Hue		 *)
  WHEEL_Saturation     = (WHEEL_Dummy+2)  ; (* set/get Saturation	 *)
  WHEEL_Brightness     = (WHEEL_Dummy+3)  ; (* set/get Brightness	 *)
  WHEEL_HSB	       = (WHEEL_Dummy+4)  ; (* set/get ColorWheelHSB     *)
  WHEEL_Red	       = (WHEEL_Dummy+5)  ; (* set/get Red		 *)
  WHEEL_Green	       = (WHEEL_Dummy+6)  ; (* set/get Green		 *)
  WHEEL_Blue	       = (WHEEL_Dummy+7)  ; (* set/get Blue		 *)
  WHEEL_RGB	       = (WHEEL_Dummy+8)  ; (* set/get ColorWheelRGB     *)
  WHEEL_Screen	       = (WHEEL_Dummy+9)  ; (* init screen/enviroment    *)
  WHEEL_Abbrv	       = (WHEEL_Dummy+10) ; (* "GCBMRY" if English	 *)
  WHEEL_Donation       = (WHEEL_Dummy+11) ; (* colors donated by app     *)
  WHEEL_BevelBox       = (WHEEL_Dummy+12) ; (* inside a bevel box	 *)
  WHEEL_GradientSlider = (WHEEL_Dummy+13) ; (* attached gradient slider  *)
  WHEEL_MaxPens	       = (WHEEL_Dummy+14) ; (* max # of pens to allocate *)

VAR
  ColorWheelBase : ADDRESS ;

PROCEDURE ConvertHSBToRGB( hsb : ColorWheelHSBPtr ; VAR rgb : ColorWheelRGB ) ;
PROCEDURE ConvertRGBToHSB( rgb : ColorWheelRGBPtr ; VAR hsb : ColorWheelHSB ) ;

END ColorWheel.
